Coding and decoding methods, coding and decoding device

ABSTRACT

Provided is a decoding method, including: acquiring coded data of a current block; determining size information of subblocks based on subblock partition information of the current block in response to the current block satisfying a subblock partition condition and determining, based on the coded data of the current block, that the current block activates intra subblock partition; determining, based on the size information of each subblock, a transform pair corresponding to the subblock; and performing an inverse transform on inversely quantized data of the subblocks based on the transform pairs corresponding to the subblocks.

This application is a US national stage of international application No.PCT/CN2020/078487, filed on Mar. 9, 2020, which claims priority toChinese Patent Application No. 201910177528.9, filed on Mar. 9, 2019 andentitled “METHODS FOR PERFORMING ENCODING AND DECODING, ENCODING END ANDDECODING END,” the content of which is incorporated herein by referencein its entirety.

TECHNICAL FIELD

The present disclosure relates to the field of audio and videotechnologies, in particular, relates to coding and decoding methods, andcoding and decoding devices.

BACKGROUND

With the development of Internet technologies and computer technologies,more and more video applications are being developed, and users' demandsfor high-definition videos in the video applications are increasing.However, because a high-definition video generally contains a largeamount of data, before transmission in a limited network bandwidth, thehigh-definition video needs to be coded. Data coding generally includes:intra prediction (or inter prediction), transform, quantization, entropycoding, in-loop filtering, and the like. During the coding, when acurrent block satisfies an intra subblock partition condition, subblocksof the current block may also be respectively predicted, transformed,quantized, and entropy-coded. A coding device determines whether toperform prediction, transform, quantization, and entropy coding based onthe current block or subblocks of the current block in accordance withrate distortion optimization (RDO) criteria.

SUMMARY

In order to solve the problems in the related art, embodiments of thepresent disclosure provide a coding method, a decoding method, a codingdevice, a decoding device and a system. The technical solutions aresummarized as follows.

In a first aspect, a decoding method is provided. The method includes:acquiring coded data of a current block; determining size informationand shape information of subblocks based on subblock partitioninformation of the current block when the current block satisfies asubblock partition condition and it is determined, based on the codeddata of the current block, that the current block activates intrasubblock partition; determining, based on the size information and theshape information of each subblock, a transform pair corresponding tothe subblock; and performing an inverse transform on inversely quantizeddata of the subblocks based on the transform pairs corresponding to thesubblocks;

wherein determining, based on the size information and the shapeinformation of the each subblock, the transform pair corresponding tothe subblock includes: determining DST7 as a horizontal transform kernelin the transform pair corresponding to the subblock when a width of thesubblock satisfies a first dimension constraint condition and a shape ofthe subblock satisfies a first condition; and determining DST7 as avertical transform kernel in the transform pair corresponding to thesubblock when a height of the subblock satisfies a second dimensionconstraint condition and the shape of the subblock satisfies a secondcondition.

In some possible embodiments of the present disclosure, determining,based on the size information and shape information of the subblock, thetransform pair corresponding to each subblock further includes:determining DCT2 as a horizontal transform kernel in the transform paircorresponding to the subblock when the width of the subblock fails tosatisfy the first dimension constraint condition and/or the shape of thesubblock fails to satisfy the first condition; and determining DCT2 as avertical transform kernel in the transform pair corresponding to thesubblock when the height of the subblock fails to satisfy the seconddimension constraint condition and/or the shape of the subblock fails tosatisfy the second condition.

wherein determining, based on the size information and the shapeinformation of the each subblock, the transform pair corresponding tothe subblock includes: determining DST7 as a horizontal transform kernelin the transform pair corresponding to the subblock when a width of thesubblock satisfies a first dimension constraint condition and a shape ofthe subblock satisfies a first condition; and determining Discrete SineTransform-7 (DST7) as a vertical transform kernel in the transform paircorresponding to the subblock when a height of the subblock satisfies asecond dimension constraint condition and the shape of the subblocksatisfies a second condition.

In some possible embodiments of the present disclosure, determining,based on the size information and shape information of the subblock, thetransform pair corresponding to each subblock further includes:determining Discrete Cosine Transform-2 (DCT2) as a horizontal transformkernel in the transform pair corresponding to the subblock when thewidth of the subblock fails to satisfy the first dimension constraintcondition and/or the shape of the subblock fails to satisfy the firstcondition; and determining DCT2 as a vertical transform kernel in thetransform pair corresponding to the subblock when the width of thesubblock fails to satisfy the second dimension constraint conditionand/or the shape of the subblock fails to satisfy the second condition.

In a second aspect, a coding method is provided. The method includes:acquiring residual data of a current block; determining size informationand shape information of subblocks of the current block based onsubblock partition information of the current block when the currentblock satisfies a subblock partition condition and subblock partition isactivated; determining a transform pair corresponding to each subblockbased on the size information and shape information of the subblock; andperforming a transform on residual data of the subblocks based on thetransform pairs corresponding to the subblocks;

wherein determining the transform pair corresponding to each subblockbased on the size information and shape information of the subblockincludes: determining DST7 as a horizontal transform kernel in thetransform pair corresponding to the subblock when a width of thesubblock satisfies a first dimension constraint condition and a shape ofthe subblock satisfies a first condition; determining DST7 as a verticaltransform kernel in the transform pair of the subblock when a height ofthe subblock satisfies a second dimension constraint condition and theshape of the subblock satisfies a second condition.

In some possible embodiments of the present disclosure, the methodfurther includes: acquiring the subblock partition information of thecurrent block when the current block satisfies the subblock partitioncondition; and adding the subblock partition information to coded dataof the current block.

In a third aspect, a decoding method is provided. The method includes:acquiring coded data of a current block; when the current blocksatisfies a subblock partition condition and it is determined, based onthe coded data of the current block, that the current block activatesintra-subblock partition, determining size information of subblocksbased on subblock partition information of the current block, anddetermining intra prediction mode information of the subblocks;determining, based on the size information and the intra prediction modeinformation of each subblock, a transform pair corresponding to thesubblock; and performing an inverse transform on inversely quantizeddata of the subblocks based on the transform pairs corresponding to thesubblocks;

wherein determining, based on the size information and the intraprediction mode information of each subblock, the transform paircorresponding to each subblock includes: determining a transform paircorresponding to the intra prediction mode information of each subblockas the transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that thesubblock fails to satisfy a dimension constraint condition, wherein thedimension constraint condition is that a width is not within a presetvalue range, and a height is not within the preset value range.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to each subblock based on the sizeinformation of the subblock and the intra prediction mode information ofthe subblock further includes:

when it is determined, based on the size information of the subblock,that the height of the subblock satisfies the dimension constraintcondition and the width of the subblock fails to satisfy the dimensionconstraint condition, determining DCT2 as a vertical transform kernel inthe transform pair corresponding to the subblock, and determining ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a horizontaltransform kernel in the transform pair corresponding to the subblock;

when it is determined, based on the size information of the subblock,that the width of the subblock satisfies the dimension constraintcondition and the height of the subblock fails to satisfy the dimensionconstraint condition, determining DCT2 as a horizontal transform kernelin the transform pair corresponding to the subblock, and determining avertical transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a verticaltransform kernel in the transform pair of the subblock; and

determining DCT2 as a vertical transform kernel and a vertical transformkernel in the transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that both theheight and the width of the subblock satisfy the dimension constraintcondition.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblockincludes: determining the transform pair corresponding to the subblockas (DCT2, DCT2) when mode numbers of the intra prediction modeinformation of the subblock are 1, 33, 35; determining the transformpair corresponding to the subblock as (DST7, DST7) when the mode numbersof the intra prediction mode information of the subblock are 0, 31, 32,34, 36, 37; determining the transform pair corresponding to the subblockas (DST7, DCT8) when the mode numbers of the intra prediction modeinformation of the subblock are 2, 30, even numbers between 2 and 30,39, 65, and odd numbers between 39 and 65; and determining the transformpair corresponding to the subblock as (DCT8, DST7) when the mode numbersof the intra prediction mode information of the subblock are 3, 29, oddnumbers between 3 and 29, 38, 66, and even numbers between 38 and 66.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblockincludes: determining the transform pair corresponding to the subblockas a first transform pair when a mode number of the intra predictionmode information of the subblock is 1; determining the transform paircorresponding to the subblock as a second transform pair when the modenumbers of the intra prediction mode information of the subblock are 0,31, 32, 33, 34, 35, 36, 37; determining the transform pair correspondingto the subblock as a third transform pair when the mode numbers of theintra prediction mode information of the subblock are 2, 30, evennumbers between 2 and 30, 39, 65, and odd numbers between 39 and 65; anddetermining the transform pair corresponding to the subblock as a fourthtransform pair when the mode numbers of the intra prediction modeinformation of the subblock are 3, 29, odd numbers between 3 and 29, 38,66, and even numbers between 38 and 66.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblockincludes: determining the transform pair corresponding to the subblockas a first transform pair when a mode number of the intra predictionmode information of the subblock is 1; determining the transform paircorresponding to the subblock as a second transform pair when the modenumber of the intra prediction mode information of the subblock is 0;determining the transform pair corresponding to the subblock as a thirdtransform pair when the mode numbers of the intra prediction modeinformation of the subblock are 2, 34, even numbers between 2 and 34,35, 65, and odd numbers between 35 and 65; and determining the transformpair corresponding to the subblock as a fourth transform pair when themode numbers of the intra prediction mode information of the subblockare 3, 33, odd numbers between 3 and 33, 36, 66, and even numbersbetween 36 and 66.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblockincludes: determining the transform pair corresponding to the subblockas a first transform pair when the mode number of the intra predictionmode information of the subblock is 1; determining the transform paircorresponding to the subblock as a second transform pair when the modenumbers of the intra prediction mode information of the subblock are to0, 3, 65, and odd numbers between 3 and 65; determining the transformpair corresponding to the subblock as a third transform pair when themode numbers of the intra prediction mode information of the subblockare 2, 34, and even numbers between 2 and 34; and determining thetransform pair corresponding to the subblock as a fourth transform pairwhen the mode numbers of the intra prediction mode information of thesubblock are 36, 66, and even numbers between 36 and 66.

In some possible embodiments of the present disclosure, the firsttransform pair is (DCT2, DCT2), the second transform pair is (DST7,DST7), the third transform pair is (DST7, DCT2), and the fourthtransform pair is (DCT2, DST7); or the first transform pair is (DCT2,DCT2), the second transform pair is (DST7, DST7), the third transformpair is (DST7, DCT8), and the fourth transform pair is (DCT8, DST7).

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblock whenit is determined, based on the size information of the subblock, thatthe subblock fails to satisfy the dimension constraint conditionincludes: determining the transform pair corresponding to the intraprediction mode information as the transform pair corresponding to eachsubblock when it is determined, based on the size information of thesubblock, that the subblock fails to satisfy the dimension constraintcondition and that the intra prediction mode information of the subblocksatisfies an intra prediction mode range.

In some possible embodiments of the present disclosure, the methodfurther includes: determining a ratio of a width to a height of eachsubblock based on the size information of the subblock when it isdetermined, based on the size information of the subblock, that thesubblock fails to satisfy the dimension constraint condition and thatthe intra prediction mode information of the subblock fails to satisfythe intra prediction mode range; and determining, based on the ratio ofthe width to the height of the subblock and the intra prediction modeinformation of the subblock, the transform pair corresponding to thesubblock.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; or the intra prediction mode rangeincludes intra prediction mode information with mode numbers of 0 and 1;or the intra prediction mode range includes intra prediction modeinformation with mode numbers of 0, 1, 3, 65, and odd numbers between 3and 65.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; and determining, based on the ratioof the width to the height of the subblock and the intra prediction modeinformation of the subblock, the transform pair corresponding to thesubblock includes:

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, 39, 41, 43, 65, even numbers between 6 and30, and odd numbers between 43 and 65; and determining the transformpair corresponding to the current block as (DCT2, DST7) when the ratioof the width to the height of the current block is equal to 1 and themode numbers of the intra prediction mode information are 3, 5, 7, 29,and odd numbers between 7 and 29;

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 30, 3, 5, B, 39, 41, 43, 65, evennumbers between (B+3) and 30, odd numbers between 5 and B, and oddnumbers between 43 and 65; and determining the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are B+2, B+4, 29, 38,40, 66, 2, 4, (B−1), odd numbers between B+4 and 29, even numbersbetween 40 and 66, and even numbers between 4 and (B−1); and

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, (B+1), (B+3), 66, 39, 41, (B−2), evennumbers between 6 and 30, even numbers between (B+3) and 66, and oddnumbers between 41 and (B−2); and determining the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 29, B, (B+2),65, 38, 40, (B−1), odd numbers between 5 and 29, odd numbers between(B+2) and 65, and even numbers between 40 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0 and 1; and

determining, based on the ratio of the width to the height of thesubblock and the intra prediction mode information of the subblock, thetransform pair corresponding to the subblock includes:

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, 35, 37, 39, 41, 43, 65, even numbersbetween 6 and 34, and odd numbers between 43 and 65; and determining thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is equal to 1and the mode numbers of the intra prediction mode information are 3, 5,7, 33, 36, 38, 40, 66, odd numbers between 7 and 33, and even numbersbetween 40 and 66;

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, 3, 5, B, 35, 37, 39, 65, evennumbers between (B+3) and 34, odd numbers between 5 and B, and oddnumbers between 39 and 65; and determining the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are (B+2), (B+4), 33,2, 4, (B−1), 36, 38, 66, odd numbers between (B+4) and 33, even numbersbetween 4 and (B−1), and even numbers between 38 and 66; and

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, 35, 37, 39, (B−2), evennumbers between 6 and 34, odd numbers between (B+3) and 66, and oddnumbers between 39 and (B−2); and determining the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 33, B, (B+2),65, 36, 38, (B−1), odd numbers between 5 and 33, odd numbers between(B+2) and 65, and even numbers between 38 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, 3, 65, and odd numbers between 3 and 65; and

determining, based on the ratio of the width to the height of thesubblock and the intra prediction mode information of the subblock, thetransform pair corresponding to the subblock includes:

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, and even numbers between 6 and 34; anddetermining the transform pair corresponding to the current block as(DCT2, DST7) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 36, 38, 40, 66, and even numbers between 40 and 66;

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, and even numbers between (B+3)and 34; and determining the transform pair corresponding to the currentblock as (DCT2, DST7) when the ratio of the width to the height of thecurrent block is greater than 1 and the mode numbers of the intraprediction mode information are 36, 38, 66, 2, 4, (B−1), even numbersbetween 38 and 66, and even numbers between 4 and (B−1); and

determining the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, even numbers between 6and 34, and even numbers between (B+3) and 66; and determining thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is less than 1and the mode numbers of the intra prediction mode information are 36,38, (B−1), and even numbers between 38 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the methodfurther includes: determining, based on the size information and theintra prediction mode information of the current block, the transformpair corresponding to the current block when the current block does notactivate the subblock partition.

In some possible embodiments of the present disclosure, determining,based on the size information and the intra prediction mode informationof the current block, the transform pair corresponding to the currentblock further includes:

determining the transform pair corresponding to the intra predictionmode information as the transform pair corresponding to the currentblock when it is determined, based on the size information, that thecurrent block fails to satisfy a target dimension constraint condition,wherein the target dimension constraint condition is that the width isgreater than or equal to a target value, and the height is greater thanor equal to the target value;

when it is determined, based on the size information, that the height ofthe current block satisfies the target dimension constraint conditionand the width of the current block fails to satisfy the target dimensionconstraint condition, determining DCT2 as a vertical transform kernel inthe transform pair corresponding to the current block, and determining ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information as a horizontal transform kernel inthe transform pair corresponding to the current block;

when it is determined, based on the size information, that the width ofthe current block satisfies the target dimension constraint conditionand the height of the current block fails to satisfy the targetdimension constraint condition, determining DCT2 as a horizontaltransform kernel in the transform pair corresponding to the currentblock, and determining a vertical transform kernel in the transform paircorresponding to the intra prediction mode information as a verticaltransform kernel in the transform pair corresponding to the currentblock; and

determining DCT2 as a horizontal transform kernel and a verticaltransform kernel in the transform pair corresponding to the currentblock when it is determined based on the size information, that both thewidth and the height of the current block satisfy the target dimensionconstraint condition.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block, theheight and the width of the current block are both less than or equal toa first preset value, the current block is a single-line referenceduring performing intra prediction, and a number of pixels included inthe current block is greater than a second preset value.

In a fourth aspect, a coding method is provided. The method includes:acquiring residual data of a current block; determining intra predictionmode information of subblocks of the current block and size informationof the subblocks of the current block based on subblock partitioninformation of the current block when the current block satisfies asubblock partition condition and intra subblock partitioning isactivated; determining, based on the size information of the subblockand the intra prediction mode information of the subblock, a transformpair corresponding to each subblock; and performing a transform onresidual data of the subblocks based on the transform pairscorresponding to the subblocks;

wherein determining, based on the size information of the subblock andthe intra prediction mode information of the subblock, the transformpair corresponding to each subblock includes: determining a transformpair corresponding to the intra prediction mode information of eachsubblock as a transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that thesubblock fails to satisfy a dimension constraint condition, wherein thedimension constraint condition is that a width is not within a firstpreset value range, and a height is not within a second preset valuerange.

In some possible embodiments of the present disclosure, the methodfurther includes:

acquiring subblock partition information of the current block when thecurrent block satisfies the subblock partition condition; and adding thesubblock partition information to coded data of the current block.

In a fifth aspect, a decoding method is provided. The decoding deviceincludes: an acquiring module, configured to acquire coded data of acurrent block; a determining module, configured to: determine sizeinformation and shape information of subblocks based on subblockpartition information of the current block when the current blocksatisfies a subblock partition condition and it is determined, based onthe coded data of the current block, that the current block activatesintra subblock partition; and determine, based on the size informationand shape information of the subblock, a transform pair corresponding toeach subblock; and a transforming module, configured to perform aninverse transform on inversely quantized data of the subblocks based onthe transform pairs corresponding to the subblocks;

wherein the determining module is configured to: determine DST7 as ahorizontal transform kernel in the transform pair corresponding to thesubblock when a width of the subblock satisfies a first dimensionconstraint condition and a shape of the subblock satisfies a firstcondition; and determine DST7 as a vertical transform kernel in thetransform pair corresponding to the subblock when a height of thesubblock satisfies a second dimension constraint condition and the shapeof the subblock satisfies a second condition.

In some possible embodiments of the present disclosure, the determiningmodule is further configured to: determine DCT2 as a horizontaltransform kernel in the transform pair corresponding to the subblockwhen the width of the subblock fails to satisfy the first dimensionconstraint condition and/or the shape of the subblock fails to satisfythe first condition; and determine DCT2 as a vertical transform kernelin the transform pair corresponding to the subblock when the height ofthe subblock fails to satisfy the second dimension constraint conditionand/or the shape of the subblock fails to satisfy the second condition.

In some possible embodiments of the present disclosure, the firstdimension constraint condition and the second dimension constraintcondition are greater than or equal to a first value, and less than orequal to a second value; the first condition is that the width is lessthan or equal to the height, and the second condition is that the widthis greater than or equal to the height; or

the first dimension constraint condition and the second dimensionconstraint condition are greater than or equal to a first value, andless than or equal to a second value; the first condition is that thewidth is less than the height, and the second condition is that thewidth is greater than the height.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block, theheight and the width of the current block are both less than or equal toa third value, the current block is a single-line reference duringperforming intra prediction, and a number of pixels included in thecurrent block is greater than a fourth value.

In a sixth aspect, a coding device is provided. The coding deviceincludes: an acquiring module, configured to acquire residual data of acurrent block; a determining module, configured to:

determine size information and shape information of subblocks of thecurrent block based on subblock partition information of the currentblock when the current block satisfies a subblock partition conditionand subblock partition is activated; and determine, based on the sizeinformation and shape information of the subblock, a transform paircorresponding to each subblock; and a transforming module, configured toperform a transform on residual data of the subblocks based on thetransform pairs corresponding to the subblocks;

wherein the determining module is configured to: determine DST7 as ahorizontal transform kernel in the transform pair corresponding to thesubblock when a width of the subblock satisfies a first dimensionconstraint condition and a shape of the subblock satisfies a firstcondition; and determine DST7 as a vertical transform kernel in thetransform pair of the subblock when a height of the subblock satisfies asecond dimension constraint condition and the shape of the subblocksatisfies a second condition.

In some possible embodiments of the present disclosure, the acquiringmodule is further configured to: acquire the subblock partitioninformation of the current block when the current block satisfies thesubblock partition condition; and add the subblock partition informationto coded data of the current block.

In a seventh aspect, a decoding device is provided. The decoding deviceincludes: an acquiring module, configured to acquire coded data of acurrent block; a determining module, configured to: when the currentblock satisfies a subblock partition condition and it is determined,based on the coded data of the current block, that the current blockactivates intra-subblock partition, determine size information ofsubblocks based on subblock partition information of the current block,and determine intra prediction mode information of the subblocks; anddetermine, based on the size information of the subblock and the intraprediction mode information of the subblock, a transform paircorresponding to each subblock; and a transforming module, configured toperform an inverse transform on inversely quantized data of thesubblocks based on the transform pairs corresponding to the subblocks;

wherein the determining module is configured to: determine a transformpair corresponding to the intra prediction mode information of eachsubblock as the transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that thesubblock fails to satisfy a dimension constraint condition, wherein thedimension constraint condition is that a width is not within a presetvalue range, and a height is not within the preset value range.

In some possible embodiments of the present disclosure, the determiningmodule is further configured to:

when it is determined, based on the size information of the subblock,that the height of the subblock satisfies the dimension constraintcondition and the width of the subblock fails to satisfy the dimensionconstraint condition, determine DCT2 as a vertical transform kernel inthe transform pair corresponding to the subblock, and determine ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a horizontaltransform kernel in the transform pair corresponding to the subblock;

when it is determined, based on the size information of the subblock,that the width of the subblock satisfies the dimension constraintcondition and the height of the subblock fails to satisfy the dimensionconstraint condition, determine DCT2 as a horizontal transform kernel inthe transform pair corresponding to the subblock, and determine avertical transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a verticaltransform kernel in the transform pair of the subblock; and

determine DCT2 as a vertical transform kernel and a vertical transformkernel in the transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that both theheight and the width of the subblock satisfy the dimension constraintcondition.

In some possible embodiments of the present disclosure, the determiningmodule is configured to: determine the transform pair corresponding tothe subblock as (DCT2, DCT2) when mode numbers of the intra predictionmode information of the subblock are 1, 33, 35; determine the transformpair corresponding to the subblock as (DST7, DST7) when the mode numbersof the intra prediction mode information of the subblock are 0, 31, 32,34, 36, 37; determine the transform pair corresponding to the subblockas (DST7, DCT8) when the mode numbers of the intra prediction modeinformation of the subblock are 2, 30, even numbers between 2 and 30,39, 65, and odd numbers between 39 and 65; and determine the transformpair corresponding to the subblock as (DCT8, DST7) when the mode numbersof the intra prediction mode information of the subblock are 3, 29, oddnumbers between 3 and 29, 38, 66, and even numbers between 38 and 66.

In some possible embodiments of the present disclosure, the determiningmodule is configured to: determine the transform pair corresponding tothe subblock as a first transform pair when a mode number of the intraprediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode numbers of the intra prediction mode information of thesubblock are 0, 31, 32, 33, 34, 35, 36, 37; determine the transform paircorresponding to the subblock as a third transform pair when the modenumbers of the intra prediction mode information of the subblock are 2,30, even numbers between 2 and 30, 39, 65, and odd numbers between 39and 65; and determine the transform pair corresponding to the subblockas a fourth transform pair when the mode numbers of the intra predictionmode information of the subblock are 3, 29, odd numbers between 3 and29, 38, 66, and even numbers between 38 and 66.

In some possible embodiments of the present disclosure, the determiningmodule is configured to: determine the transform pair corresponding tothe subblock as a first transform pair when a mode number of the intraprediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode number of the intra prediction mode information of thesubblock is 0; determine the transform pair corresponding to thesubblock as a third transform pair when the mode numbers of the intraprediction mode information of the subblock are 2, 34, even numbersbetween 2 and 34, 35, 65, and odd numbers between 35 and 65; anddetermine the transform pair corresponding to the subblock as a fourthtransform pair when the mode numbers of the intra prediction modeinformation of the subblock are 3, 33, odd numbers between 3 and 33, 36,66, and even numbers between 36 and 66.

In some possible embodiments of the present disclosure, the determiningmodule is configured to: determine the transform pair corresponding tothe subblock as a first transform pair when the mode number of the intraprediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode numbers of the intra prediction mode information of thesubblock are to 0, 3, 65, and odd numbers between 3 and 65; determinethe transform pair corresponding to the subblock as a third transformpair when the mode numbers of the intra prediction mode information ofthe subblock are 2, 34, and even numbers between 2 and 34; and determinethe transform pair corresponding to the subblock as a fourth transformpair when the mode numbers of the intra prediction mode information ofthe subblock are 36, 66, and even numbers between 36 and 66.

In some possible embodiments of the present disclosure, the firsttransform pair is (DCT2, DCT2), the second transform pair is (DST7,DST7), the third transform pair is (DST7, DCT2), and the fourthtransform pair is (DCT2, DST7); or the first transform pair is (DCT2,DCT2), the second transform pair is (DST7, DST7), the third transformpair is (DST7, DCT8), and the fourth transform pair is (DCT8, DST7).

In some possible embodiments of the present disclosure, the determiningmodule is configured to: determine the transform pair corresponding tothe intra prediction mode information as the transform paircorresponding to each subblock when it is determined, based on the sizeinformation of the subblock, that the subblock fails to satisfy thedimension constraint condition and that the intra prediction modeinformation of the subblock satisfies an intra prediction mode range.

In some possible embodiments of the present disclosure, the determiningmodule is further configured to: determine a ratio of a width to aheight of each subblock based on the size information of the subblockwhen it is determined, based on the size information of the subblock,that the subblock fails to satisfy the dimension constraint conditionand that the intra prediction mode information of the subblock fails tosatisfy the intra prediction mode range; and determine, based on theratio of the width to the height of the subblock and the intraprediction mode information of the subblock, the transform paircorresponding to the subblock.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; or the intra prediction mode rangeincludes intra prediction mode information with mode numbers of 0 and 1;or the intra prediction mode range includes intra prediction modeinformation with mode numbers of 0, 1, 3, 65, and odd numbers between 3and 65.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; and

the determining module is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, 39, 41, 43, 65, even numbers between 6 and30, and odd numbers between 43 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is equal to 1 and the modenumbers of the intra prediction mode information are 3, 5, 7, 29, andodd numbers between 7 and 29;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 30, 3, 5, B, 39, 41, 43, 65, evennumbers between (B+3) and 30, odd numbers between 5 and B, and oddnumbers between 43 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are B+2, B+4, 29, 38,40, 66, 2, 4, (B−1), odd numbers between B+4 and 29, even numbersbetween 40 and 66, and even numbers between 4 and (B−1); and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, (B+1), (B+3), 66, 39, 41, (B−2), evennumbers between 6 and 30, even numbers between (B+3) and 66, and oddnumbers between 41 and (B−2); and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 29, B, (B+2),65, 38, 40, (B−1), odd numbers between 5 and 29, odd numbers between(B+2) and 65, and even numbers between 40 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0 and 1; and

the determining module is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, 35, 37, 39, 41, 43, 65, even numbersbetween 6 and 34, and odd numbers between 43 and 65; and determine thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is equal to 1and the mode numbers of the intra prediction mode information are 3, 5,7, 33, 36, 38, 40, 66, odd numbers between 7 and 33, and even numbersbetween 40 and 66;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, 3, 5, B, 35, 37, 39, 65, evennumbers between (B+3) and 34, odd numbers between 5 and B, and oddnumbers between 39 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are (B+2), (B+4), 33,2, 4, (B−1), 36, 38, 66, odd numbers between (B+4) and 33, even numbersbetween 4 and (B−1), and even numbers between 38 and 66; and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, 35, 37, 39, (B−2), evennumbers between 6 and 34, odd numbers between (B+3) and 66, and oddnumbers between 39 and (B−2); and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 33, B, (B+2),65, 36, 38, (B−1), odd numbers between 5 and 33, odd numbers between(B+2) and 65, and even numbers between 38 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, 3, 65, and odd numbers between 3 and 65; and

the determining module is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, and even numbers between 6 and 34; anddetermine the transform pair corresponding to the current block as(DCT2, DST7) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 36, 38, 40, 66, and even numbers between 40 and 66;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, and even numbers between (B+3)and 34; and determine the transform pair corresponding to the currentblock as (DCT2, DST7) when the ratio of the width to the height of thecurrent block is greater than 1 and the mode numbers of the intraprediction mode information are 36, 38, 66, 2, 4, (B−1), even numbersbetween 38 and 66, and even numbers between 4 and (B−1); and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, even numbers between 6and 34, and even numbers between (B+3) and 66; and determine thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is less than 1and the mode numbers of the intra prediction mode information are 36,38, (B−1), and even numbers between 38 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the determiningmodule is further configured to: determine, based on the sizeinformation and the intra prediction mode information of the currentblock, the transform pair corresponding to the current block when thecurrent block does not activate the subblock partition.

In some possible embodiments of the present disclosure, the determiningmodule is further configured to:

determine the transform pair corresponding to the intra prediction modeinformation as the transform pair corresponding to the current blockwhen it is determined, based on the size information, that the currentblock fails to satisfy a target dimension constraint condition, whereinthe target dimension constraint condition is that the width is greaterthan or equal to a target value, and the height is greater than or equalto the target value;

when it is determined, based on the size information, that the height ofthe current block satisfies the target dimension constraint conditionand the width of the current block fails to satisfy the target dimensionconstraint condition, determine DCT2 as a vertical transform kernel inthe transform pair corresponding to the current block, and determine ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information as a horizontal transform kernel inthe transform pair corresponding to the current block;

when it is determined, based on the size information, that the width ofthe current block satisfies the target dimension constraint conditionand the height of the current block fails to satisfy the targetdimension constraint condition, determine DCT2 as a horizontal transformkernel in the transform pair corresponding to the current block, anddetermine a vertical transform kernel in the transform paircorresponding to the intra prediction mode information as a verticaltransform kernel in the transform pair corresponding to the currentblock; and

determine DCT2 as a horizontal transform kernel and a vertical transformkernel in the transform pair corresponding to the current block when itis determined based on the size information, that both the width and theheight of the current block satisfy the target dimension constraintcondition.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block, theheight and the width of the current block are both less than or equal toa first preset value, the current block is a single-line referenceduring performing intra prediction, and a number of pixels included inthe current block is greater than a second preset value.

In an eighth aspect, a coding device is provided. The coding deviceincludes: an acquiring module, configured to acquire residual data of acurrent block; a determining module, configured to: determine intraprediction mode information of subblocks of the current block and sizeinformation of the subblocks of the current block based on subblockpartition information of the current block when the current blocksatisfies a subblock partition condition and intra subblock partitioningis activated; and determine, based on the size information of thesubblock and the intra prediction mode information of the subblock, atransform pair corresponding to each subblock; and a transformingmodule, configured to perform a transform on residual data of thesubblocks based on the transform pairs corresponding to the subblocks;

wherein the determining module is configured to: determine a transformpair corresponding to the intra prediction mode information of eachsubblock as a transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that thesubblock fails to satisfy a dimension constraint condition, wherein thedimension constraint condition is that a width is not within a firstpreset value range, and a height is not within a second preset valuerange.

In some possible embodiments of the present disclosure, the acquiringmodule is further configured to: acquire subblock partition informationof the current block when the current block satisfies the subblockpartition condition; and add the subblock partition information to codeddata of the current block.

In a ninth aspect, a decoding device is provided. The decoding deviceincludes a processor and a memory storing a computer program therein;wherein the computer program, when run by the processor, causes theprocessor to implement the steps of the decoding method according to anyone of the first aspect and the third aspect.

In a tenth aspect, a coding device is provided. The coding deviceincludes a processor and a memory storing a computer program therein;wherein the computer program, when run by the processor, cause theprocessor to implement the steps of the coding method according to anyone of the second aspect and the fourth aspect.

In an eleventh aspect, a computer-readable storage medium is provided.The computer-readable storage medium is configured to store a computerprogram therein, the computer program, when run by a processor, causethe processor to implement the steps of the method according to any oneof the first aspect to the fourth aspect.

In a twelfth aspect, a system for coding and decoding is provided. Thesystem includes a coding device and a decoding device, wherein thecoding device is the coding device according to the sixth aspect; andthe decoding device is the decoding device according to the fifthaspect; or the coding device is the coding device according to theeighth aspect; and the decoding device is the decoding device accordingto the seventh aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram showing partition types of a blockaccording to an embodiment of the present disclosure;

FIG. 2 is a schematic diagram showing that a CTU is partitioned into CUsaccording to an embodiment of the present disclosure;

FIG. 3 is a schematic diagram showing three commonly-used blocksaccording to an embodiment of the present disclosure;

FIG. 4 is a schematic diagram of directions when intra prediction isperformed according to an embodiment of the present disclosure;

FIG. 5 is a schematic diagram of adjustment based on a block shapeaccording to an embodiment of the present disclosure;

FIG. 6 is a schematic diagram of coding according to an embodiment ofthe present disclosure;

FIG. 7 is a schematic diagram of a distributed signal according to anembodiment of the present disclosure;

FIG. 8 is a schematic diagram of residual data distribution according toan embodiment of the present disclosure;

FIG. 9 is a flowchart of a decoding method according to an embodiment ofthe present disclosure;

FIG. 10 is a flowchart of a coding method according to an embodiment ofthe present disclosure;

FIG. 11 is a schematic diagram of partitioning subblocks according to anembodiment of the present disclosure;

FIG. 12 is a flowchart of another decoding method according to anembodiment of the present disclosure;

FIG. 13 is a flowchart of another coding method according to anembodiment of the present disclosure;

FIG. 14 is a schematic structural diagram of a decoding device accordingto an embodiment of the present disclosure;

FIG. 15 is a schematic structural diagram of a coding device accordingto an embodiment of the present disclosure;

FIG. 16 is a schematic structural diagram of another decoding deviceaccording to an embodiment of the present disclosure;

FIG. 17 is a schematic structural diagram of another coding deviceaccording to an embodiment of the present disclosure;

FIG. 18 is a schematic structural diagram of still another coding deviceaccording to an embodiment of the present disclosure; and

FIG. 19 is a schematic structural diagram of still another decodingdevice according to an embodiment of the present disclosure.

DETAILED DESCRIPTION

For clearer descriptions of the objectives, technical solutions andadvantages in the present disclosure, the embodiments of the presentdisclosure are described in further detail hereinafter with reference tothe accompanying drawings.

In the related art, during the transform, a preset transform pair (thetransform pair includes a horizontal transform kernel and a verticaltransform kernel) is selected, and subblocks obtained by partitioningthe current block are subjected to transform to acquire a transformcoefficient. Correspondingly, an inverse transform corresponding to thetransform is performed at a decoding device, i.e., selecting the presettransform pair used in the coding, and performing the inverse transformon the subblocks obtained by partitioning the current block to acquireresidual data corresponding to the subblocks.

In this way, because the same subblock is transformed using differenttransform pairs, the compression effect is quite different, thetransforms of all subblocks by using the same preset transform pair mayresult in poor coding and decoding performance.

The present disclosure provides a coding method and a decoding method.The coding method may be performed by a coding device. The decodingmethod may be performed a decoding device. Further, the coding device orthe decoding device may be a device capable of coding and/or decodingvideo data, such as a server, a computer, or a mobile phone.

A processor, a memory, a transceiver, and the like may be disposed inthe coding device or the decoding device. The processor may beconfigured to code and/or decode data. The memory may be configured tostore data required for and data generated in a coding and/or decodingprocess. The transceiver may be configured to receive and transmit data,for example, to acquire the video data.

Concepts possibly involved in the embodiments of the present disclosureare explained first before the embodiments are described.

Transform Kernel:

In video coding, transform is an indispensable phase for video datacompression, and enables energy of signals to be more concentrated. Inaddition, a transform technique based on discrete cosine transform(DCT)/discrete sine transform (DST) has been a mainstream transformtechnique of video coding. Each of the DCT and the DST specificallyincludes a plurality of transform kernels based on different basisfunctions. The basis functions of three commonly-used transform kernelsare given in Table 1.

TABLE 1 Type of transform kernel Basic function T_(i)(j), i, j = 0, 1, .. . , N − 1 DCT2${{T_{i}(j)} = {\omega_{0} \cdot \sqrt{\frac{2}{N}} \cdot {\cos\left( \frac{\pi \cdot i \cdot \left( {{2j} + 1} \right)}{2N} \right)}}},$${{in}{which}\omega_{0}} = \left\{ {\begin{matrix}{1,\ {i \neq 0}} \\\sqrt{\frac{2}{N}}\end{matrix},{i = 0}} \right.$ DCT8${T_{i}(j)} = {\sqrt{\frac{4}{{2N} + 1}} \cdot {\cos\left( \frac{\pi \cdot \left( {{2i} + 1} \right) \cdot \left( {{2j} + 1} \right)}{{4N} + 2} \right)}}$DST7${T_{i}(j)} = {\sqrt{\frac{4}{{2N} + 1}} \cdot {\sin\left( \frac{\pi \cdot \left( {{2i} + 1} \right) \cdot \left( {j + 1} \right)}{{2N} + 1} \right)}}$

Forward transform and inverse transform:

In video coding, a transform process includes a forward transform and aninverse transform, which are also referred to as a forward transform anda backward transform. Forward transform means that a two-dimensionalresidual signal (a residual coefficient) is converted to atwo-dimensional spectrum signal (a transform coefficient) with energymore concentrated and then the transform coefficient is quantized, suchthat a high-frequency component is effectively removed andintermediate-frequency and low-frequency components are retained,thereby achieving the effect of compression. It is expressed in a matrixas formula (1):F=B·f·A ^(T)  (1),

wherein M represents a width of a residual block, N represents a heightof the residual block, f represents an original residual signal of N*Mdimensions, and F represents a frequency-domain signal of N*Mdimensions. A and B represent an M*M-dimensional transform matrix and anN*N-dimensional transform matrix respectively, both of which satisfyorthogonality.

Inverse transform, also called reverse transform, is an inverse processof forward transform. That is, the frequency-domain signal F isconverted to a time-domain residual signal f by orthogonal transformmatrices A and B. It is expressed in a matrix as formula (2):f=B ^(T) ·F·A  (2)

Horizontal transform and vertical transform:

In a transform phase of video coding, a two-dimensional residual signalis input. As shown in formula (3), if X=A·f^(T), F=B·X^(T).F=B·f·A ^(T) =B·(A·f ^(T))^(T)  (3)

Therefore, the forward transform of one two-dimensional residual signalis realized by one-dimensional forward transform twice. Upon the firstforward transform, an M*N signal X is acquired and a correlation betweenpixels in a horizontal direction of the two-dimensional residual signalis canceled. Therefore, the first forward transform is referred to as ahorizontal transform, and A is referred to as a horizontal transformmatrix. Upon the second forward transform, a correlation between pixelsin a vertical direction of the two-dimensional residual signal iscanceled. Therefore, the second forward transform is referred to as avertical transform, and B is referred to as a vertical transform matrix.

Transform Pair:

In a next-generation video coding standard, a transform unit (TU) may bea rectangular block. Therefore, M is not necessarily equal to N, andthus the dimensions of A and B are not necessarily equal. In addition,the next-generation video coding standard supports that A and B are nottransform matrices produced by the same transform kernel. Thus, there isa transform pair {H, V} composed of transform kernels corresponding to Aand B respectively in the transform, where H is referred to as ahorizontal transform kernel and V is referred to as a vertical transformkernel.

Block Partition:

In high-efficiency video coding (HEVC), a 64*64 coding tree unit (CTU)is recursively partitioned into coding units (CU) using a quadtree.Whether to use intra-frame coding or inter-frame coding is determined ata leaf node CU level. The CU is further partitioned into two or fourprediction units (PU), and the same prediction information is used inthe same PU. After a residual signal is acquired upon completion ofprediction, one CU is further partitioned into a plurality of TUs usingthe quad-tree.

However, in newly-proposed versatile video coding (VVC), a blockpartition technology has changed greatly. An original partition mode isreplaced with a binary-tree/triple-tree/quad-tree (BT/TT/QT)) hybridpartition structure, the original concepts of CU, PU, and TU arecanceled, and a more flexible partition mode of the CU is supported. TheCU is subjected to square or rectangular partitioning. The CTU isfirstly subjected to quad-tree partitioning, and then each of leaf nodesacquired from quad-tree partitioning is further subjected to binary-treepartitioning and triple-tree partitioning. That is, totally fivepartitioning schemes are available: quad-tree partitioning, horizontalbinary-tree partitioning, vertical binary-tree partitioning, horizontaltriple-tree partitioning and vertical triple-tree partitioning, as shownin FIG. 1 , which shows the five partitioning schemes. In FIG. 1 , (a)represents no partitioning, (b) represents quad-tree partitioning, (c)represents horizontal binary-tree partitioning, (d) represents verticalbinary-tree partitioning, (e) represents horizontal triple-treepartitioning and (f) represents vertical triple-tree partitioning. Asshown in FIG. 2 , an exemplary diagram showing that one CTU ispartitioned into CUs is provided.

Therefore, based on the partition schemes, the block usually has threeshapes as shown in FIG. 3 . In FIG. 3 , (a) represents a block whosewidth is greater than its height, (b) represents a block whose width isequal to its height, and (c) represents a block whose width is smallerthan its height.

Intra Prediction:

Intra prediction means that considering a strong spatial-domaincorrelation between adjacent blocks in an image, a currently uncodedblock is predicted by using surrounding pixels, which have beenreconstructed, as reference pixels. Therefore, only a residual signal(an original signal-a prediction signal) needs to be subjected tosubsequent coding, instead of coding the original signal. In this way,the spatial-domain redundancy is effectively removed and the compressionefficiency of a video signal is greatly improved. In addition, in intraprediction, more densely arranged angles achieve better the predictioneffects. FIG. 4 shows a diagram of angular directions when intraprediction is performed in 67 intra prediction modes given by VVC,wherein the number of intra prediction modes is increased to 65 from 33of HEVC. A mode number 0 indicates a planar mode; a mode number 1indicates s a DC mode (the DC mode means that predicted pixels of thecurrent block are the average of reference pixels), black solid linesrepresent the angular directions (2, 4, 6, 8, . . . , 64, 66) oforiginal HEVC, and dashed lines represent added angular directions (3,5, 7, 9, . . . , 63, 65). With the denser angular directions, boundariesof any direction in a natural video may be more effectively captured,and more reference information may be used for rate-distortion costselection, such that a more suitable intra prediction mode is found topredict the current block more accurately. Thus, a prediction block iscloser to the original block, and fewer bits need to be transmitted forcoding the current block, achieving higher coding performance. Whenintra prediction coding is performed, these 67 intra-frame modes areapplied to coded blocks of all sizes, including a luma component and achroma component.

In FIG. 4 , where the mode number of the intra prediction mode is 2 to34, an angle between an angular direction and a horizontal rightwarddirection is −45 degrees to 45 degrees; and where the mode number of theintra prediction mode is 35 to 66, the angle between the angulardirection and the horizontal rightward direction is −135 degrees to 45degrees.

It should be noted that in a plane rectangular coordinate system, thehorizontal rightward direction is a positive direction of the x-axis,and a vertical upward direction is a positive direction of the y-axis.In this way, an angle formed by a ray with the origin as a vertex (theray is in a direction distal from the origin) in each of a firstquadrant and a second quadrant and the positive direction of the x-axisis a positive, and an angle formed by a ray with the origin as a vertex(the ray is in the direction distal from the origin) in each of a thirdquadrant and a fourth quadrant and the positive direction of the x-axisis negative. For example, an angle between the horizontal rightwarddirection and the axis of symmetry (in the direction distal from theorigin) in the fourth quadrant is −45 degrees.

Wide-Angle Intra Prediction:

For rectangular blocks, a wide-angle prediction mode based on blockshapes is introduced to replace some traditional intra prediction modes.The original mode numbers are still used in the replacement mode, inthis way, there are still 65 angle modes in total, but they may beadjusted based on different shapes. The details are shown in FIG. 5 .

In FIG. 5 , (a) shows a square block for which the angle direction isjust clockwise rotated from 45 degrees to −135 degrees, and thus noadjustment is required.

In FIG. 5 , (b) shows a block whose width is greater than its height,and the following adjustment needs to be made. That is, several anglesat the lower left corners are replaced with several angles greater than−135 degrees at the upper right corner.

In FIG. 5 , (c) shows a block whose width is less than its height, andthe following adjustment needs to be made. That is, several angles atthe upper right corners are replaced with several angles less than 45degrees at the lower left corner.

A mapping relationship of the specific wide-angle prediction modes isshown in Table 2:

TABLE 2 Width (W)/height Intra prediction mode (H) ratio (mode number)to be replaced  W/H == 16 Modes 12, 13, 14, 15 W/H == 8 Modes 12, 13 W/H== 4 Modes 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 W/H == 2 Modes 2, 3, 4, 5, 6,7, W/H == 1 None   W/H == 1/2 Modes 61, 62, 63, 64, 65, 66   W/H == 1/4Mode 57, 58, 59, 60, 61, 62, 63, 64, 65, 66   W/H == 1/8 Modes 55, 56   W/H == 1/16 Modes 53, 54, 55, 56

An embodiment of the present disclosure provides a common coding frame.As shown in FIG. 6 , a complete video coding method generally includesprediction, transform, quantization, entropy coding, in-loop filteringand the like. The prediction specifically includes intra prediction andinter prediction. The intra prediction means that considering a strongspatial-domain correlation between adjacent blocks in an image, acurrently uncoded block is predicted by using surrounding pixels, whichhave been reconstructed, as reference pixels. Therefore, only a residualsignal (an original signal-a prediction signal) needs to be subjected tosubsequent coding, instead of coding the original signal. As a result,the spatial-domain redundancy is effectively removed and the compressionefficiency of a video signal is greatly improved. The inter predictionmeans that by using a time-domain correlation of video signals, pixelsof a current image are predicted with pixels of an adjacent coded imageto achieve the purpose of removing the time-domain redundancy of avideo. In inter prediction, due to a strong time-domain correlation ofvideos, that is, two frames of images adjacent in the time domain havemany similar image blocks, the image blocks of the current frame areoften subjected to motion search in the adjacent reference image to finda block that best matches the current block as a reference block. Due toa high similarity and a very small difference value between thereference block and the current block, the bit rate overhead of codingthe difference value is usually much lower than the bit rate overheadcaused by directly coding the pixel value of the current block.

In the transform process, for the same TU (which may also be referred toas a residual block or a current block), when different transform pairsare used to compress the residual block, the compression effects arequite different. This is determined by a basis function of the transformkernel itself. As shown in FIG. 7 , corresponding to the basis functionsof three transform kernels, i.e., DCT2, DST7, and DCT8, input signalbits are 64 points. It can be seen from a zero-order basis function inthe figure that DCT2 has a relatively stronger energy concentrationeffect on uniformly distributed signals, and a direct current componentformed is a multiple of the average value of the input signals. DST7 hasa relatively stronger energy concentration effect on input signals withascending amplitudes. DCT8 has a relatively stronger energyconcentration effect on input signals with descending amplitudes.

For more intuitively experiencing relationships between differenttransform kernels and residual properties, as shown in FIG. 8 , fivedifferent horizontal and vertical transform pairs represent differenttypes of residual distribution. The transform kernel type {DCT2, DCT2}represents that the residual of the TU is uniformly distributed, and thetransform kernel type {DST7, DST7} represents that the residualdistribution of the TU increases sequentially from left to right andfrom top to bottom, and that the residual of the TU is mainlydistributed at the lower right corner of the TU. Similarly, {DCT8, DST7}represents that the residual is mainly distributed at the lower leftcorner of the TU, {DST7, DCT8} represents that the residual is mainlydistributed at the upper right corner of the TU, and {DCT8, DCT8}represents that the residual is mainly distributed at the upper leftcorner of the TU.

An embodiment of the present disclosure provides a decoding method. Aflowchart of this method may be shown in FIG. 9 .

In step 901, a decoding device acquires coded data of a current block.

In practice, where coded data needs to be decoded, the decoding deviceacquires the coded data, then acquires the coded data of the currentblock by performing entropy decoding on the coded data and performinginverse quantization on an entropy decoding result.

In step 902, the decoding device determines size information and shapeinformation of subblocks based on subblock partition information of thecurrent block when the current block satisfies a subblock partitioncondition and it is determined, based on the coded data of the currentblock, that the current block activates intra subblock partition.

The subblock partition information indicates how to partition thecurrent block. For example, for an 8*4 current block, it may behorizontally partitioned into two 8*2 subblocks.

In practice, in response to acquiring the current block, the decodingdevice may determine whether the current block satisfies the subblockpartition condition; check from the coded data of the current blockwhether a flag bit of intra subblock partitioning is a preset flag whenthe current block satisfies the subblock partition condition; determinethat the current block activates intra subblock partitioning when theflag position is the preset flag; or determine that the current blockdoes not activate the intra subblock partitioning when the flag bit isnot the preset flag.

At the decoding device, when it is determined that the current blockactivates intra subblock partition, the subblock partition informationof the current block is acquired from the coded data of the currentblock; then subblocks are acquired by partitioning the current blockbased on the subblock partition information of the current block; andthe number of pixels of each subblock of the current block in a heightdirection (i.e., a height of each subblock) is determined, and thenumber of pixels in a width direction (i.e., a width of each subblock)is determined. In this way, the size information of the subblocks isacquired. The shape information of the subblocks may be then determinedbased on the heights and widths of the subblocks. The shape informationmeans that the height of each subblock is greater than the width, theheight of each subblock is less than the width, and the height of eachsubblock is equal to the width.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block and theheight and the width of the current block are both less than or equal toa third value, and the current block is a single-line reference whenbeing subjected to intra prediction and the number of pixels included inthe current block is greater than a fourth value.

The third value may be preset and stored in the decoding device. Thethird value may be 64. The current block being the single-line referenceduring the intra prediction means that only one line is referencedduring the intra prediction of the current block. The fourth value maybe preset and stored in the decoding device. The fourth value may be 16.

In step 903, the decoding device determines, based on the sizeinformation and shape information of each subblock, a transform paircorresponding to the subblock. Determining, based on the sizeinformation and shape information of each subblock, the transform paircorresponding to the subblock includes: determining DST7 as a horizontaltransform kernel in the transform pair corresponding to the subblockwhen a width of the subblock satisfies a first dimension constraintcondition and a shape of the subblock satisfies a first condition; anddetermining DST7 as a vertical transform kernel in the transform paircorresponding to the subblock when a height of the subblock satisfies asecond dimension constraint condition and the shape of the subblocksatisfies a second condition.

The first dimension constraint condition is that the width is greaterthan or equal to the first value, and less than or equal to the secondvalue; the first condition is that the width is less than or equal tothe height; the second dimension constraint condition is that the heightis greater than or equal to the first value, and less than or equal tothe second value; and the second condition is that the width is greaterthan or equal to the height. Alternatively, the first dimensionconstraint condition is that the width is greater than or equal to thefirst value, and less than or equal to the second value; the seconddimension constraint condition is that the height is greater than orequal to the first value, and less than or equal to the second value;the first condition is that the width is less than or equal to theheight; and the second condition is that the width is greater than theheight.

The first value and the second value may be preset and stored in thedecoding device. The first value may be 4, and the second value may be16. One transform pair includes one horizontal transform kernel and onevertical transform kernel.

In practice, each subblock of the current block is processed as follows.

The decoding device may determine whether the width of the subblocksatisfies the first dimension constraint condition and whether the shapeof the subblock satisfies the first condition; and determine whether theheight of the subblock satisfies the second dimension constraintcondition and whether the shape of the subblock satisfies the secondcondition. DST7 is determined as the horizontal transform kernel in thetransform pair corresponding to the subblock when the width of thesubblock satisfies the first dimension constraint condition and theshape of the subblock satisfies the first condition. DST7 is determinedas the vertical transform kernel in the transform pair corresponding tothe subblock when the height of the subblock satisfies the seconddimension constraint condition and the shape of the subblock satisfiesthe second condition.

In addition, in some possible embodiments of the present disclosure,DCT2 is determined as the horizontal transform kernel in the transformpair corresponding to the subblock when the width of the subblock failsto satisfy the first dimension constraint condition and/or the shape ofthe subblock fails to satisfy the first condition. DCT2 is determined asthe vertical transform kernel in the transform pair corresponding to thesubblock when the height of the subblock fails to satisfy the seconddimension constraint condition and/or the shape of the subblock fails tosatisfy the second condition.

In practice, DCT2 is determined as the horizontal transform kernel inthe transform pair corresponding to the subblock when at least one ofthe cases where the width of the subblock fails to satisfy the firstdimension constraint condition and the shape of the subblock fails tosatisfy the first condition is true. DCT2 is determined as the verticaltransform kernel in the transform pair corresponding to the subblockwhen at least one of the cases that the height of the subblock fails tosatisfy the second dimension constraint condition and the shape of thesubblock fails to satisfy the second condition is true.

In this way, after the horizontal transform kernel and verticaltransform kernel of the subblock are determined, the horizontaltransform kernel and the vertical transform kernel may form a transformpair corresponding to the subblock. For any subblock, the transform paircan be determined by the above fashion, thus, the transform pairscorresponding to subblocks can be determined.

In step 904, the decoding device performs an inverse transform oninversely quantized data of the subblocks based on the transform pairscorresponding to the subblocks.

In practice, after the transform pairs corresponding to the subblocksare determined, the subblocks are subjected to inverse transform by thecorresponding transform pairs to acquire residual data corresponding tothe subblocks. Then, pixel values of pixels in a reconstructed areaaround the current block are used to construct prediction signals of thesubblocks according to an intra prediction mode used during coding. Foreach subblock, reconstruction information of the subblock is acquired byadding up the residual data of the subblock and the prediction signal.In this way, the reconstruction information of the subblocks can beacquired, and the reconstruction information corresponding to thecurrent block may be acquired by merging the reconstruction informationof the subblocks.

In this way, the decoding of the current block is completed. Eachcurrent block is processed in accordance with the process shown in FIG.9 , so as to decode a whole segment of video data.

It should be noted that, in the aforementioned embodiment, after thecurrent block is partitioned, the subblocks have the same width and thesame height.

Corresponding to the decoding method shown in FIG. 9 , as shown in FIG.10 , an embodiment of the present disclosure further provides a codingprocess. The process may include the following steps.

In step 1001, a coding device acquires residual data of a current block.

In practice, the coding device performs intra prediction first whencoding video data, to acquire residual data (the method for acquiringthe residual data is consistent with the existing video codingstandards, which is not repeated). The residual data is taken as theresidual data of the current block to be processed.

In step 1002, the coding device determines size information and shapeinformation of subblocks of the current block based on subblockpartition information of the current block when the current blocksatisfies a subblock partition condition and intra subblock partitioningis activated.

The subblock partition information indicates how to partition thecurrent block. For example, for an 8*4 current block, it may behorizontally partitioned into two 8*2 subblocks.

In practice, in response to acquiring the residual data of the currentblock, the coding device may determine whether the current blocksatisfies the subblock partition condition; and determine whether theintra subblock partitioning is activated when the subblock partitioncondition is satisfied. When a switch for intra subblock partitioning ispowered on, it is indicated that the intra subblock partitioning may beactivated and the current block can be partitioned, the heights andwidths of the subblocks acquired by partitioning the current block arethen determined. The width of the current block is the number of pixelscontained in the current block in its width direction, the height of thecurrent block is the number of pixels contained in the current block inits height direction, the width of each subblock is the number of pixelscontained in the subblock in its width direction, and the height of eachsubblock is the number of pixels contained in the subblock in its heightdirection. In this way, the size information of each subblock can beacquired. For a current block of M*N, M represents the width of thecurrent block, and N represents the height of the current block.

The shape information of the subblocks may be then determined based onthe heights and widths of the blocks. The shape information means thatthe height of the subblock is greater than, less than or equal to thewidth of the subblock.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block and theheight and the width of the current block are both less than or equal toa third value, and the current block is a single-line reference whenbeing subjected to intra prediction and the number of pixels included inthe current block is greater than a fourth value.

The third value may be preset and stored in the coding device. The thirdvalue may be 64. The current block being the single-line referenceduring the intra prediction means that only one line is referencedduring the intra prediction of the current block. The fourth value maybe preset and stored in the coding device. The fourth value may be 16.

In step 1003, the coding device determines a transform paircorresponding to each subblock based on the size information and shapeinformation of the subblock. Determining the transform paircorresponding to each subblock based on the size information and shapeinformation of the subblock includes: determining DST7 as a horizontaltransform kernel in the transform pair corresponding to the subblockwhen a width of the subblock satisfies a first dimension constraintcondition and a shape of the subblock satisfies a first condition; anddetermining DST7 as a vertical transform kernel in the transform paircorresponding to the subblock when a height of the subblock satisfies asecond dimension constraint condition and the shape of the subblocksatisfies a second condition.

Each subblock of the current block is processed as follows.

The coding device may determine whether the width of the subblocksatisfies the first dimension constraint condition and whether the shapeof the subblock satisfies the first condition; and determine whether theheight of the subblock satisfies the second dimension constraintcondition and whether the shape of the subblock satisfies the secondcondition. DST7 is determined as the horizontal transform kernel in thetransform pair corresponding to the subblock when the width of thesubblock satisfies the first dimension constraint condition and theshape of the subblock satisfies the first condition. DST7 is determinedas the vertical transform kernel in the transform pair corresponding tothe subblock when the height of the subblock satisfies the seconddimension constraint condition and the shape of the subblock satisfiesthe second condition.

In addition, in some possible embodiments of the present disclosure,DCT2 is determined as the horizontal transform kernel in the transformpair corresponding to the subblock when the width of the subblock failsto satisfy the first dimension constraint condition and/or the shape ofthe subblock fails to satisfy the first condition. DCT2 is determined asthe vertical transform kernel in the transform pair corresponding to thesubblock when the height of the subblock fails to satisfy the seconddimension constraint condition and/or the shape of the subblock fails tosatisfy the second condition.

In practice, DCT2 is determined as the horizontal transform kernel inthe transform pair corresponding to the subblock when at least one ofthe cases where the width of the subblock fails to satisfy the firstdimension constraint condition and the shape of the subblock fails tosatisfy the first condition is true. DCT2 is determined as the verticaltransform kernel in the transform pair corresponding to the subblockwhen at least one of the cases where the height of the subblock fails tosatisfy the second dimension constraint condition and the shape of thesubblock fails to satisfy the second condition is true.

In this way, when the horizontal transform kernel and vertical transformkernel of the subblock are determined, the horizontal transform kerneland the vertical transform kernel may form a transform paircorresponding to the subblock. For any subblock, the transform pair canbe determined by the above fashion, thus, the transform pairscorresponding to each subblock can be determined.

In step 1004, the coding device performs a transform on residual data ofthe subblocks based on the transform pairs corresponding to thesubblocks.

In practice, in response to determining the transform pairscorresponding to the subblocks, the coding device acquires a transformcoefficient corresponding to the subblock by transforming each subblockbased on the transform pair corresponding to the subblock; then acquiresa quantization coefficient by quantizing the transform coefficient; andacquires coded data corresponding to the subblock by entropy coding thequantization coefficient.

In this way, the coded data corresponding to the current block can beacquired based on the above processing for each subblock, such that thecoding of the current block is completed. Each current block may beprocessed in accordance with the process shown in FIG. 10 , so as tocode a whole segment of video data.

In some possible embodiments of the present disclosure, in order toquickly perform subblock partitioning on the current block by thedecoding device, the following processing may be performed: acquiringthe subblock partition information of the current block when the currentblock satisfies the subblock partition condition; and adding thesubblock partition information to coded data of the current block.

In practice, the coding device may acquire the subblock partitioninformation of the current block when the current block satisfies thesubblock partition condition; and add the subblock partition informationto the coded data of the current block. In this way, the decoding devicemay subsequently acquire, from the coded data of the current block, thesubblock partition information of the current block for decoding.

In addition, in the embodiments of the present disclosure, the processfor acquiring the subblock partition information by the coding device isalso provided.

The coding device may partition the current block horizontally orvertically into several small subblocks. For example, for a 16*8 currentblock, it may be partitioned into four 16*2 subblocks horizontally orinto four 4*8 subblocks vertically. However, for a 4*8 block, it may bepartitioned into two 4*4 subblocks or two 2*8 subblocks. It may be notedthat the number of subblocks can be only 2 (for 4*8, 8*4 subblocks). Inaddition, each subblock contains at least 16 pixels, such that the 4*4block is not partitioned again, and there is no need to makecorresponding grammar declarations at the coding device and the decodingdevice. The specific partitioning rules are shown in Table 3. As forwhether to partition horizontally or vertically, it needs to bedetermined by the coding device based on an RDO criterion. In order tosave the coding time, the partitioned intra subblocks share an intraprediction mode of the current block (that is, the subblocks obtained bypartitioning the current block have the same intra prediction mode asthe current block).

TABLE 3 Horizontal Vertical w W $\left\{ \begin{matrix}{\frac{W}{4},{{{if}\frac{W}{4}*H} \geq 16}} \\{\frac{16}{H},{{{if}\frac{W}{4}*H} < 16}}\end{matrix} \right.$ h $\left\{ \begin{matrix}{\frac{H}{4},{{{if}\frac{H}{4}*W} \geq 16}} \\{\frac{16}{W},{{{if}\frac{H}{4}*W} < 16}}\end{matrix} \right.$ H K $\frac{H}{h}$ $\frac{W}{w}$

In Table 3, w represents the width of each subblock, h represents theheight of each subblock, K represents the number of subblocks that maybe partitioned, W represents the width of the current block, and Hrepresents the height of the current block. The current block may bepartitioned horizontally and vertically according to Table 3. Forexample, as shown in FIG. 11 , for an 8*4 current block, it may behorizontally partitioned into two 8*2 subblocks, or be verticallypartitioned into two 4*4 subblocks.

The process of determining the subblock partition information based onthe RDO criterion may include: determining a plurality of split types ofthe current block first according to Table 3; then performing codingbased on each split type; and then performing decoding to determine thesplit type with the least rate-distortion cost as the final split typeof the current block. In this way, the subblock partition information ofthe current block is acquired.

In the embodiments of the present disclosure, at the coding device, thetransform pairs corresponding to the subblocks are determined directlybased on the size information and shape information of the subblocks ofthe current block; and the determined transform pairs are coded.Similarly, at the decoding device, the transform pairs corresponding tothe subblocks are directly determined based on the size information andshape information of the subblocks of the current block; and thedetermined transform pairs are decoded. In this way, since the transformpairs are determined based on the size information and shapeinformation, instead of using the same transform pair for all subblocks,the coding and decoding performance can be improved. Moreover, when thetransform pairs are derived, only the heights and widths are used, suchthat the derivation is simpler, and the coding and decoding performancecan be further improved.

Another embodiment of the present disclosure provides a decoding method.A flowchart of this method may be shown in FIG. 12 .

In step 1201, a decoding device acquires coded data of a current block.

In practice, where coded data needs to be decoded, the decoding deviceacquires the coded data, then acquires the coded data of the currentblock by performing entropy decoding on the coded data and performinginverse quantization on an entropy decoding result.

In step 1202, when the current block satisfies a subblock partitioncondition and it is determined, based on the coded data of the currentblock, that the current block activates intra-subblock partition, thedecoding device determines size information of subblocks based onsubblock partition information of the current block.

The subblock partition information indicates how to partition thecurrent block. For example, for an 8*4 current block, it may behorizontally partitioned into two 8*2 subblocks.

In practice, in response to acquiring the current block, the decodingdevice can determine whether the current block satisfies a subblockpartition condition; check from the coded data of the current blockwhether a flag bit of intra subblock partitioning is a preset flag whenthe current block satisfies the subblock partition condition; determinethat the current block activates intra subblock partitioning when theflag bit is the preset flag; or determine that the current block doesnot activate the intra subblock partitioning when the flag bit is notthe preset flag.

At the decoding device, when it is determined that the current blockactivates intra subblock partition, the subblock partition informationof the current block is acquired from the coded data of the currentblock; then subblocks are acquired by partitioning the current blockbased on the subblock partition information of the current block; andthe number of pixels of each subblock of the current block in a heightdirection (i.e., a height of each subblock) is determined, and thenumber of pixels in a width direction (i.e., a width of each subblock)is determined. In this way, the size information of the subblocks isacquired. In addition, the content of a flag bit configured to indicatethe intra prediction mode information may be acquired from the codeddata of the current block, that is, the intra prediction modeinformation of the current block may be acquired.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block and theheight and the width of the current block are both less than or equal toa first preset value, and the current block is a single-line referencewhen being subjected to intra prediction and the number of pixelsincluded in the current block is greater than a second preset value.

The first preset value may be preset and stored in the decoding device(the same as the third value as mentioned above). The first preset valuemay be 64. The current block being the single-line reference during theintra prediction means that only one line is referenced during the intraprediction of the current block. The second preset value may be presetand stored in the decoding device. The second preset value may be 16(the same as the fourth value as mentioned above).

In step 1203, the decoding device determines, based on the sizeinformation and the intra prediction mode information of each subblock,a transform pair corresponding to the subblock. Determining, based onthe size information and the intra prediction mode information of eachsubblock, the transform pair corresponding to the subblock includes:determining the transform pair corresponding to the intra predictionmode information of each subblock as the transform pair corresponding tothe subblock when it is determined, based on the size information of thesubblock, that the subblock fails to satisfy a dimension constraintcondition.

The dimension constraint condition is that the width is not within apreset value range, and the height is not within the preset value range.The preset value range is (2, 32) (excluding 2 and 32). “Not within thepreset value range” means being greater than 32 and/or less than 2.

In practice, each subblock of the current block is processed as follows:

for any subblock, the decoding device may determine whether the sizeinformation of the subblock satisfies the dimension constraintcondition; determine a corresponding transform pair in correspondingrelationships between the intra prediction mode information and thetransform pairs by using the intra prediction mode information of thecurrent block when the dimension constraint condition (the width is notwithin the preset value range and the height is not within the presetvalue range) is not satisfied; and determine this transform pair as thetransform pair of the subblock.

In addition, in some possible embodiments of the present disclosure,when it is determined, based on the size information of the subblock,that the height of the subblock satisfies the dimension constraintcondition and the width of the subblock fails to satisfy the dimensionconstraint condition, DCT2 is determined as a vertical transform kernelin the transform pair corresponding to the subblock, and a horizontaltransform kernel in the transform pair corresponding to the intraprediction mode information of the subblock is determined as ahorizontal transform kernel in the transform pair corresponding to thesubblock. When it is determined, based on the size information of thesubblock, that the width of the subblock satisfies the dimensionconstraint condition and the height of the subblock fails to satisfy thedimension constraint condition, DCT2 is determined as a horizontaltransform kernel in the transform pair corresponding to the subblock,and a vertical transform kernel in the transform pair corresponding tothe intra prediction mode information of the subblock is determined as avertical transform kernel in the transform pair corresponding to thesubblock. When it is determined based on the size information of eachsubblock that both the height and the width of the subblock satisfy thedimension constraint condition, DCT2 is determined as a horizontaltransform kernel and a vertical transform kernel in the transform paircorresponding to the subblock.

In practice, when the height of the subblock satisfies the dimensionconstraint condition and the width of the subblock fails to satisfy thedimension constraint condition, DCT2 may be determined as the verticaltransform kernel in the transform pair corresponding to each subblock.In addition, a transform pair corresponding to the intra prediction modeinformation of the current block may be directly determined fromcorresponding relationships between the intra prediction modeinformation and the transform pairs based on the intra prediction modeinformation. The horizontal transform kernel in this transform pair isdetermined as a horizontal transform kernel corresponding to the currentblock.

When the width of the subblock satisfies the dimension constraintcondition and the height of the subblock fails to satisfy the dimensionconstraint condition, DCT2 may be determined as the horizontal transformkernel in the transform pair corresponding to each subblock. Inaddition, a transform pair corresponding to the intra prediction modeinformation of the current block may be directly determined fromcorresponding relationships between the intra prediction modeinformation and the transform pairs based on the intra prediction modeinformation. The vertical transform kernel in this transform pair isdetermined as a vertical transform kernel corresponding to the currentblock.

When both the height and the width of the subblock satisfy the dimensionconstraint condition, DCT2 is determined as the horizontal transformkernel and the vertical transform kernel in the transform paircorresponding to the subblock.

In this way, the transform pairs corresponding to the subblocks may bedetermined based on the above fashion.

In step 1204, the decoding device performs an inverse transform oninversely quantized data of the subblocks based on the transform pairscorresponding to the subblocks.

In practice, after the transform pairs corresponding to the subblocksare determined, the subblocks is subjected to inverse transform by thecorresponding transform pairs to acquire residual data corresponding tothe subblocks. Then, pixel values of pixels in a reconstructed areaaround the current block are used to construct prediction signals of thesubblocks based on an intra prediction mode used during coding. For eachsubblock, reconstruction information of the subblock is acquired byadding up the residual data of the subblock and the prediction signal.In this way, the reconstruction information of the subblocks may beacquired, and the reconstruction information corresponding to thecurrent block may be acquired by merging the reconstruction informationof the subblocks.

In this way, the decoding of the current block is completed. Eachcurrent block is processed in accordance with the process shown in FIG.12 , so as to decode a whole segment of video data.

It should be noted that, in the aforementioned embodiment, after thecurrent block is partitioned, the subblocks have the same width and thesame height.

In step 1203, in some possible embodiments of the present disclosure,the transform pair corresponding to the intra prediction modeinformation of the subblock may be determined as the transform paircorresponding to the subblock in the following fashions.

In a first fashion, when the mode numbers of the intra prediction modeinformation of the subblock are 1, 33, 35, the transform paircorresponding to the subblock is determined as (DCT2, DCT2); when themode numbers of the intra prediction mode information of the subblockare 0, 31, 32, 34, 36, 37, the transform pair corresponding to thesubblock is determined as (DST7, DST7); when the mode numbers of theintra prediction mode information of the subblock are 2, 30, evennumbers between 2 and 30, 39, 65, and odd numbers between 39 to 65, thetransform pair corresponding to the subblock is determined as (DST7,DCT8); and when the mode numbers of the intra prediction modeinformation of the subblock are 3, 29, odd number between 3 and 29, 38,66, and even numbers between 38 to 66, the transform pair correspondingto the subblock is determined as (DCT8, DST7).

In practice, corresponding relationships between intra prediction modeinformation and transform pairs are provided, as listed in Table 4:

TABLE 4 Intra prediction Transform pair mode information Horizontaltransform Vertical transform (mode number) kernel kernel 1, 33, 35 DCT2DCT2 0, 31, 32, 34, 36, 37 DST7 DST7 2, 4, 6, . . . , 28, 30 DST7 DCT839, 41, 43, . . . , 63, 65 3, 5, 7, . . . , 27, 29 DCT8 DST7 38, 40, 42,. . . , 64, 66

In a second fashion, when the mode number of the intra prediction modeinformation of the subblock is 1, the transform pair corresponding tothe subblock is determined as a first transform pair; when the modenumbers of the intra prediction mode information of the subblock are 0,31, 32, 33, 34, 35, 36, 37, the transform pair corresponding to thesubblock is determined as a second transform pair; when the mode numbersof the intra prediction mode information of the subblock are 2, 30, evennumbers between 2 and 30, 39, 65, and odd numbers between 39 and 65, thetransform pair corresponding to the subblock is determined as a thirdtransform pair; and when the mode numbers of the intra prediction modeinformation of the subblock are 3, 29, odd number between 3 and 29, 38,66, and even numbers between 38 and 66, the transform pair correspondingto the subblock is determined as a fourth transform pair.

In practice, corresponding relationships between intra prediction modeinformation and transform pairs are provided, as listed in Table 5:

TABLE 5 Intra prediction mode information (mode number) Transform pair 1First transform pair 0, 31, 32, 33, 34, 35, 36, 37 Second transform pair2, 4, 6, ..., 28, 30 Third transform pair 39, 41, 43, ..., 63, 65 3, 5,7, ..., 27, 29 Fourth transform pair 38, 40, 42, ..., 64, 66

In a third fashion, when the mode number of the intra prediction modeinformation of the subblock is 1, the transform pair corresponding tothe subblock is determined as a first transform pair; when the modenumber of the intra prediction mode information of the subblock is 0,the transform pair corresponding to the subblock is determined as asecond transform pair; when the mode numbers of the intra predictionmode information of the subblock are 2, 34, even numbers between 2 and34, 35, 65, and odd numbers between 35 and 65, the transform paircorresponding to the subblock is determined as a third transform pair;and when the mode numbers of the intra prediction mode information ofthe subblock are 3, 33, odd number between 3 and 33, 36, 66, and evennumbers between 36 and 66, the transform pair corresponding to thesubblock is determined as a fourth transform pair.

In practice, corresponding relationships between intra prediction modeinformation and transform pairs are provided, as listed in Table 6:

TABLE 6 Intra prediction mode information (mode number) Transform pair 1First transform pair 0 Second transform pair 2, 4, 6, ..., 28, 30, 32,34 Third transform pair 35, 37, 39, 41, 43, ..., 63, 65 3, 5, 7, ...,27, 29, 31, 33 Fourth transform pair 36, 38, 40, 42, ..., 64, 66

In a fourth fashion, when the mode number of the intra prediction modeinformation of the subblock is 1, the transform pair corresponding tothe subblock is determined as a first transform pair; when the modenumbers of the intra prediction mode information of the subblock are 0,3, 65, and odd numbers between 3 and 65, the transform paircorresponding to the subblock is determined as a second transform pair;when the mode numbers of the intra prediction mode information of thesubblock are 2, 34, and even numbers between 2 and 34, the transformpair corresponding to the subblock is determined as a third transformpair; and when the mode numbers of the intra prediction mode informationof the subblock are 36, 66, and even numbers between 36 and 66, thetransform pair corresponding to the subblock is determined as a fourthtransform pair.

In practice, corresponding relationships between intra prediction modeinformation and transform pairs are provided, as listed in Table 7:

TABLE 7 Intra prediction mode information (mode number) Transform pair 1First transform pair 0, 3, 5, 7, ..., 63, 65 Second transform pair 2, 4,6, ..., 28, 30, 32, 34 Third transform pair 36, 38, 40, 42, ..., 64, 66Fourth transform pair

It should be noted that in the Tables 4 to 7, the angle directions ofthe intra prediction modes with adjacent mode numbers are similar, andthen the residual characteristics are similar. By using two differenttransform pairs for transform, the coding time can be saved, andsuitable transform pairs may also be selected.

In some possible embodiments of the present disclosure, the firsttransform pair, the second transform pair, the third transform pair andthe fourth transform pair may be combined in a plurality of fashions.Two possible combinations are given as below.

In a first combination, the first transform pair is (DCT2, DCT2), thesecond transform pair is (DST7, DST7), the third transform pair is(DST7, DCT2), and the fourth transform pair is (DCT2, DST7).

In a second combination, the first transform pair is (DCT2, DCT2), thesecond transform pair is (DST7, DST7), the third transform pair is(DST7, DCT8), and the fourth transform pair is (DCT8, DST7).

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information ofthe subblock as the transform pair corresponding to the subblock shouldsatisfy the following conditions. The practice is as follows:

determining the transform pair corresponding to the intra predictionmode information as the transform pair corresponding to each subblockwhen it is determined, based on the size information of the subblock,that the subblock fails to satisfy the dimension constraint conditionand that the intra prediction mode information of the subblock satisfiesan intra prediction mode range.

The intra prediction mode range may be preset, and stored in thedecoding device. The intra prediction mode range includes intraprediction modes with mode numbers of 0, 1, and 31 to 37 (see Table 8and Table 9); or the intra prediction mode range includes intraprediction modes with mode numbers of 0, and 1 (see Table 10); or theintra prediction mode range includes intra prediction modes with modenumbers of 0, 1, 3, 65, and odd numbers between 3 and 65 (see Table 11).

In practice, in response to acquiring the mode number of the intraprediction mode information of each subblock from the coded data, thedecoding device may determine whether the mode number is within theintra prediction mode range; and directly determine a transform paircorresponding to the intra prediction mode information as the transformpair corresponding to the subblock from the corresponding relationshipsbetween the intra prediction mode information and the transform pairswhen the mode number is within the intra prediction mode range.

In some possible embodiments of the present disclosure, when the modenumber of the intra prediction mode information of the current block isnot within the intra prediction mode range, the following severalprocesses may be performed.

A ratio of a width to a height of each subblock is determined based onthe size information of the subblock when it is determined, based on thesize information of the subblock, that the subblock fails to satisfy thedimension constraint condition and that the intra prediction modeinformation of the subblock fails to satisfy the intra prediction moderange. A transform pair corresponding to the subblock is determinedbased on the ratio of the width to the height of the subblock and theintra prediction mode information of the subblock.

In practice, with respect to any subblock, in response to acquiring themode number of the intra prediction mode information of the subblockfrom the coded data, the decoding device may determine whether the modenumber is within the intra prediction mode range; determine a ratio ofthe width to the height of the subblock when the mode number is notwithin the intra prediction mode range; and determine a transform paircorresponding to the subblock based on the ratio of the width to theheight of the subblock and the intra prediction mode information of thesubblock.

In some possible embodiments of the present disclosure, when the modenumber of the intra prediction mode information of the current block isnot within the intra prediction mode range, the following severalprocessing fashions may be employed.

In a first fashion, as listed in Table 8, the intra prediction moderange includes intra prediction mode information with mode numbers of 0,1, and 31 to 37.

The width of the subblock is represented by w, and the height of thesubblock is represented by h.

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 2, 4, 6, . . . , 30, 39, 41, 43, . . ., 65 is (DST7, DCT2) (the first ellipsis represents even numbers between6 and 30, and the second ellipsis represents odd numbers between 43 and65), that is, the transform pair corresponding to the subblock is (DST7,DCT2).

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 3, 5, 7, . . . , 29, 38, 40, 42, . . ., 66 is (DCT2, DST7) (the first ellipsis represents odd numbers between7 and 29, and the second ellipsis represents even numbers between 42 and66), that is, the transform pair corresponding to the subblock is (DCT2,DST7).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+1, B+3, . . . , 30,3, 5, B, 39, 41, 43, . . . , 65 is (DST7, DCT2) (the first ellipsisrepresents even numbers between B+3 and 30, the second ellipsisrepresents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 43 and 65), that is, the transform paircorresponding to the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+2, B+4, . . . , 29,38, 40, . . . , 66, 2, 4, . . . , (B−1) is (DCT2, DST7) (the firstellipsis represents odd numbers between B+4 and 29, the second ellipsisrepresents even numbers between 40 and 66, and the third ellipsisrepresents even numbers between 4 and (B−1)), that is, the transformpair corresponding to the subblock is (DCT2, DST7).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 30, B+1, B+3, . .. , 66, 39, 41, . . . , B−2 is (DST7, DCT2) (the first ellipsisrepresents even numbers between 6 and 30, the second ellipsis representseven numbers between (B+3) and 66, and the third ellipsis represents oddnumbers between 41 and B−2), that is, the transform pair correspondingto the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, . . . , 29, B, B+2, 65, 38,40, . . . , (B−1) is (DCT2, DST7) (the first ellipsis represents oddnumbers between 5 and 29, the second ellipsis represents odd numbersbetween (B+2) and 65, and the third ellipsis represents even numbersbetween 40 and (B−1), that is, the transform pair corresponding to thesubblock is (DCT2, DST7).

TABLE 8 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1, 33, 35DCT2 DCT2 0, 31, 32, 34, 36, 37 DST7 DST7 w = h 2, 4, 6, ..., 30 DST7DCT2 39, 41, 43, ..., 65 w > h B + 1, B + 3, ..., 30 3, 5, ..., B 39,41, 43, ..., 65 w < h 2, 4, 6, ..., 30 B + 1, B + 3, ..., 66 39, 41,..., B − 2 w = h 3, 5, 7, ..., 29 DCT2 DST7 38, 40, 42, ..., 66 w > hB + 2, B + 4, ..., 29 38, 40, ..., 66 2, 4, ..., (B − 1) w < h 3, 5,..., 29 B, B + 2, ..., 65 38, 40, ..., (B − 1)

In a second fashion, as listed in Table 9, the intra prediction moderange includes intra prediction mode information with mode numbers of 0,1, and 31 to 37. The width of the subblock is represented by w, and theheight of the subblock is represented by h.

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 2, 4, 6, . . . , 30, 39, 41, 43, . . ., 65 is (DST7, DCT2) (the first ellipsis represents even numbers between6 and 30, and the second ellipsis represents odd numbers between 43 and65), that is, the transform pair corresponding to the subblock is (DST7,DCT2).

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 3, 5, 7, . . . , 29, 38, 40, 42, . . ., 66 is (DCT2, DST7) (the first ellipsis represents odd numbers between7 and 29, and the second ellipsis represents even numbers between 42 and66), that is, the transform pair corresponding to the subblock is (DCT2,DST7).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+1, B+3, . . . , 30,3, 5, B, 39, 41, 43, . . . , 65 is (DST7, DCT2) (the first ellipsisrepresents even numbers between B+3 and 30, the second ellipsisrepresents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 43 and 65), that is, the transform paircorresponding to the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+2, B+4, . . . , 29,38, 40, . . . , 66, 2, 4, . . . , (B−1) is (DCT2, DST7) (the firstellipsis represents odd numbers between B+4 and 29, the second ellipsisrepresents even numbers between 40 and 66, and the third ellipsisrepresents even numbers between 4 and (B−1)), that is, the transformpair corresponding to the subblock is (DCT2, DST7).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 30, B+1, B+3, . .. , 66, 39, 41, . . . , B−2 is (DST7, DCT2) (the first ellipsisrepresents even numbers between 6 and 30, the second ellipsis representseven numbers between (B+3) and 66, and the third ellipsis represents oddnumbers between 41 and B−2), that is, the transform pair correspondingto the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, . . . , 29, B, B+2, 65, 38,40, . . . , (B−1) is (DCT2, DST7) (the first ellipsis represents oddnumbers between 5 and 29, the second ellipsis represents odd numbersbetween B+2 and 65, and the third ellipsis represents even numbersbetween 40 and (B−1)), that is, the transform pair corresponding to thesubblock is (DCT2, DST7).

TABLE 9 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20, 31, 32, 33, 34, 35, 36, 37 DST7 DST7 w = h 2, 4, 6, ..., 30 DST7 DCT239, 41, 43, ..., 65 w > h B + 1, B + 3, ..., 30 3, 5, ..., B 39, 41, 43,..., 65 w < h 2, 4, 6, ..., 30 B + 1, B + 3, ..., 66 39, 41, ..., B − 2w = h 3, 5, 7, ..., 29 DCT2 DST7 38, 40, 42, ..., 66 w > h B + 2, B + 4,..., 29 38, 40, ..., 66 2, 4, ..., (B − 1) w < h 3, 5, ..., 29 B, B + 2,..., 65 38, 40, ..., (B − 1)

In a third fashion, as listed in Table 10, the intra prediction moderange includes intra prediction mode information with mode numbers of 0and 1. The width of the subblock is represented by w, and the height ofthe subblock is represented by h.

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 2, 4, 6, . . . , 34, 35, 37, 39, 41,43, . . . , 65 is (DST7, DCT2) (the first ellipsis represents evennumbers between 6 and 34, and the second ellipsis represents odd numbersbetween 43 and 65), that is, the transform pair corresponding to thesubblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 3, 5, 7, . . . , 33, 36, 38, 40, . . ., 66 is (DCT2, DST7) (the first ellipsis represents odd numbers between7 and 33, and the second ellipsis represents even numbers between 40 and66), that is, the transform pair corresponding to the subblock is (DCT2,DST7).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+1, B+3, . . . , 34,3, 5, B, 35, 37, 39, . . . , 65 is (DST7, DCT2) (the first ellipsisrepresents even numbers between B+3 and 34, the second ellipsisrepresents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 39 and 65), that is, the transform paircorresponding to the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+2, B+4, . . . , 33,2, 4, . . . , (B−1), 36, 38, . . . , 66 is (DCT2, DST7) (the firstellipsis represents odd numbers between (B+4) and 33, the secondellipsis represents even numbers between 4 and (B−1), and the thirdellipsis represents even numbers between 38 and 66), that is, thetransform pair corresponding to the subblock is (DCT2, DST7).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 34, B+1, B+3, . .. , 66, 35, 37, 39, . . . , B−2 is (DST7, DCT2) (the first ellipsisrepresents even numbers between 6 and 34, the second ellipsis representseven numbers between (B+3) and 66, and the third ellipsis represents oddnumbers between 39 and B−2), that is, the transform pair correspondingto the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, . . . , 33, B, B+2, 65, 36,38, . . . , (B−1) is (DCT2, DST7) (the first ellipsis represents oddnumbers between 5 and 33, the second ellipsis represents odd numbersbetween B+2 and 65, and the third ellipsis represents even numbersbetween 38 and (B−1)), that is, the transform pair corresponding to thesubblock is (DCT2, DST7).

TABLE 10 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20 DST7 DST7 w = h 2, 4, 6, ..., 34 DST7 DCT2 35, 37, 39, ..., 65 w > hB + 1, B + 3, ..., 34 3, 5, ..., B 35, 37, 39, ..., 65 w < h 2, 4, 6,..., 34 B + 1, B + 3, ..., 66 35, 37, 39, ..., B − 2 w = h 3, 5, 7, ...,33 DCT2 DST7 36, 38, 40, 42, ..., 66 w > h B + 2, B + 4, ..., 33 36, 38,..., 66 2, 4, ..., (B − 1) w < h 3, 5, ..., 33 B, B + 2, ..., 65 36, 38,..., (B − 1)

In a fourth fashion, as listed in Table 11, the intra prediction moderange includes intra prediction mode information with mode numbers of 0,1, 3, 65, and odd numbers between 3 to 65. The width of the subblock isrepresented by w, and the height of the subblock is represented by h.

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode number of 2, 4, 6, . . . , 34 is (DST7, DCT2) (theellipsis represents even numbers between 6 and 34), that is, thetransform pair corresponding to the subblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is 1 (i.e.,w=h), the transform pair corresponding to the intra prediction modeinformation with mode numbers of 36, 38, 40, . . . , 66 is (DCT2, DST7)(the ellipsis represents even numbers between 40 and 66), that is, thetransform pair corresponding to the subblock is (DCT2, DST7).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of B+1, B+3, . . . , 34 is(DST7, DCT2) (the ellipsis represents even numbers between (B+3) and34), that is, the transform pair corresponding to the subblock is (DST7,DCT2).

When the ratio of the width to the height of the subblock is greaterthan 1 (i.e., w>h), the transform pair corresponding to the intraprediction mode information with mode numbers of 36, 38, . . . , 66, 2,4, 40, . . . , (B−1) is (DCT2, DST7) (the first ellipsis represents evennumbers between 38 and 66, and the second ellipsis represents evennumbers between 4 and (B−1)), that is, the transform pair correspondingto the subblock is (DCT2, DST7).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 34, B+1, B+3, . .. , 66 is (DST7, DCT2) (the first ellipsis represents even numbersbetween 6 and 34, and the second ellipsis represents even numbersbetween (B+3) and 66), that is, the transform pair corresponding to thesubblock is (DST7, DCT2).

When the ratio of the width to the height of the subblock is less than 1(i.e., w<h), the transform pair corresponding to the intra predictionmode information with mode numbers of 36, 38, . . . , (B−1) is (DCT2,DST7) (the ellipsis represents even numbers between 38 and (B−1)), thatis, the transform pair corresponding to the subblock is (DCT2, DST7).

TABLE 11 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20, 3, 5, 7, ..., 63, 65 DST7 DST7 w = h 2, 4, 6, ..., 34 DST7 DCT2 w > hB + 1, B + 3, ..., 34 w < h 2, 4, 6, ..., 34 B + 1, B + 3, ..., 66 w = h36, 38, 40, 42, ..., 66 DCT2 DST7 w > h 36, 38, ..., 66 2, 4, ..., (B− 1) w < h 36, 38, ..., (B − 1)

It should be noted that Table 8 to Table 11 take the influence of theintra prediction mode being a wide angle mode into consideration,wherein B in the wide angle mode is determined by the ratio of the widthto height of each subblock of the current block. In Table 8 to Table 11,when w/h=2, 4, 6, and 8, the corresponding B is 7, 11, 13, and 15; andwhen w/h=1/2, 1/4, 1/6, 1/8, the corresponding B is 61, 57, 55, 53.

It should also be noted that, in Table 8 to Table 11, the intraprediction modes with adjacent mode numbers generally correspond todifferent transform pairs.

In some possible embodiments of the present disclosure, when the currentblock does not activate intra-subblock partition, the following processmay be performed: determining, based on the size information and theintra prediction mode information of the current block, a transform paircorresponding to the current block when the current block does notactivate intra-subblock partition.

In practice, the transform pair corresponding to the current block maybe determined jointly based on the size information and the intraprediction mode information of the current block when the current blockdoes not activate intra-subblock partition.

In some possible embodiments of the present disclosure, determining,based on the size information and the intra prediction mode informationof the current block, the transform pair corresponding to the currentblock jointly may include:

determining the transform pair corresponding to the intra predictionmode information as the transform pair corresponding to the currentblock when it is determined, based on the size information, that thecurrent block fails to satisfy a target dimension constraint condition;when it is determined, based on the size information, that the height ofthe current block satisfies the target dimension constraint conditionand the width of the current block fails to satisfy the target dimensionconstraint condition, determining DCT2 as a vertical transform kernel inthe transform pair corresponding to the current block, and determining ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information as a horizontal transform kernel inthe transform pair corresponding to the current block; when it isdetermined, based on the size information, that the width of the currentblock satisfies the target dimension constraint condition and the heightof the current block fails to satisfy the target dimension constraintcondition, determining DCT2 as a horizontal transform kernel in thetransform pair corresponding to the current block, and determining avertical transform kernel in the transform pair corresponding to theintra prediction mode information as a vertical transform kernel in thetransform pair corresponding to the current block; and determining DCT2as a horizontal transform kernel and a vertical transform kernel in thetransform pair corresponding to the current block when it is determinedbased on the size information that both the width and the height of thecurrent block satisfy the target dimension constraint condition.

The target dimension constraint condition is that the width is greaterthan or equal to a target value, and the height is greater than or equalto the target value. The target value may be 32.

In practice, the decoding device may determine whether the current blocksatisfies the target dimension constraint condition; and determine DCT2as the horizontal transform kernel and the vertical transform kernel inthe transform pair corresponding to the current block when the currentblock satisfies the target dimension constraint condition (i.e., boththe height and the width satisfy the target dimension constraintcondition).

When the current block fails to satisfy the target dimension constraintcondition (i.e., none of the height and the width satisfies the targetdimension constraint condition), the transform pair corresponding to theintra prediction mode information may be determined, from thecorresponding relationships between the intra prediction modeinformation and the transform pairs, as the transform pair correspondingto the current block.

When it is determined, based on the size information that the height ofthe current block satisfies the target dimension constraint conditionand that the width of the current block fails to satisfy the targetdimension constraint condition, DCT2 may be determined as the verticaltransform kernel in the transform pair corresponding to the currentblock, and the horizontal transform kernel in the transform paircorresponding to the intra prediction mode information may bedetermined, from the corresponding relationships between the intraprediction mode information and the transform pairs, as the horizontaltransform kernel in the transform pair corresponding to the currentblock.

When it is determined, based on the size information, that the width ofthe current block satisfies the target dimension constraint conditionand the height of the current block fails to satisfy the targetdimension constraint condition, DCT2 may be determined as the horizontaltransform kernel in the transform pair corresponding to the currentblock, and the vertical transform kernel in the transform paircorresponding to the intra prediction mode information may bedetermined, from the corresponding relationships between the intraprediction mode information and the transform pairs, as the verticaltransform kernel in the transform pair corresponding to the currentblock.

In some possible embodiments of the present disclosure, when a targetidentifier exists in the coded data of the current block, it may bedetermined that a transform mode of the current block is an implicitmulti-kernel transform mode, and the transform pair corresponding to thecurrent block may be determined jointly based on the size informationand the intra prediction mode information of the current block.

In some possible embodiments of the present disclosure, determining thetransform pair corresponding to the intra prediction mode information asthe transform pair corresponding to the current block may be performedin the following fashions. Several feasible implementation fashions aregiven as below.

In a first fashion, as listed in Table 12 which describes thecorresponding relationships between the intra prediction modeinformation and the transform pairs, when the mode numbers of the intraprediction mode information of the current block are 1, 33, and 35, thetransform pair corresponding to the current block is determined as afirst transform pair; when the mode numbers of the intra prediction modeinformation of the current block are 0, 31, 32, 34, 36, 37, thetransform pair corresponding to the current block is determined as asecond transform pair; when the mode numbers of the intra predictionmode information of the current block are 2, 30, 39, 65, even numbersbetween 2 and 30, and odd numbers between 39 and 65, the transform paircorresponding to the current block is determined as a third transformpair; and when the mode numbers of the intra prediction mode informationof the current block are 3, 29, 38, 66, odd numbers between 3 and 29,and even numbers between 38 and 66, the transform pair corresponding tothe current block is determined as a fourth transform pair.

TABLE 12 Intra prediction mode information (mode number) Transform pair1, 33, 35 First transform pair 0, 31, 32, 34, 36, 37 Second transformpair 2, 4, 6, ..., 28, 30, 39, 41, Third transform pair 43, ..., 63, 653, 5, 7, ..., 27, 29, 38, 40, Fourth transform pair 42, ..., 64, 66

In the first fashion, the transform pair corresponding to the currentblock may be acquired by the above Table 12.

In a second fashion, as listed in Table 13, when the mode number of theintra prediction mode information of the current block is 1, thetransform pair corresponding to the current block is determined as afirst transform pair; when the mode numbers of the intra prediction modeinformation of the current block are 0, 31, 32, 33, 34, 35, 36, 37, thetransform pair corresponding to the current block is determined as asecond transform pair; when the mode numbers of the intra predictionmode information of the current block are 2, 30, 39, 65, even numbersbetween 2 and 30, and odd numbers between 39 and 65, the transform paircorresponding to the current block is determined as a third transformpair; and when the mode numbers of the intra prediction mode informationof the current block are 3, 29, 38, 66, odd numbers between 3 and 29,and even numbers between 38 and 66, the transform pair corresponding tothe current block is determined as a fourth transform pair.

TABLE 13 Intra prediction mode information (mode number) Transform pair1 First transform pair 0, 31, 32, 33, 34, 35, 36, 37 Second transformpair 2, 4, 6, ..., 28, 30, 39, 41, Third transform pair 43, ..., 63, 653, 5, 7, ..., 27, 29, 38, 40, Fourth transform pair 42, ..., 64, 66

In the second fashion, the transform pair corresponding to the currentblock may be acquired by the above Table 13.

In a third fashion, as listed in Table 14, when the mode number of theintra prediction mode information of the current block is 1, thetransform pair corresponding to the current block is determined as afirst transform pair; when the mode number of the intra prediction modeinformation of the current block is 0, the transform pair correspondingto the current block is determined as a second transform pair; when themode numbers of the intra prediction mode information of the currentblock are 2, 34, 35, 65, even numbers between 2 and 34, and odd numbersbetween 35 and 65, the transform pair corresponding to the current blockis determined as a third transform pair; and when the mode numbers ofthe intra prediction mode information of the current block are 3, 33,36, 66, odd numbers between 3 and 33, and even numbers between 36 and66, the transform pair corresponding to the current block is determinedas a fourth transform pair.

TABLE 14 Intra prediction mode information (mode number) Transform pair1 First transform pair 0 Second transform pair 2, 4, 6, ..., 28, 30, 32,34, 35, Third transform pair 37, 39, 41, 43, ..., 63, 65 3, 5, 7, ...,27, 29, 31, 33, 36, Fourth transform pair 38, 40, 42, ..., 64, 66

In a fourth fashion, as listed in Table 15, when the mode number of theintra prediction mode information of the current block is 1, thetransform pair corresponding to the current block is determined as afirst transform pair; when the mode numbers of the intra prediction modeinformation of the current block are 0, 3, 65, and odd numbers between 3and 65, the transform pair corresponding to the current block isdetermined as a second transform pair; when the mode numbers of theintra prediction mode information of the current block are 2, 34, andeven numbers between 2 and 34, the transform pair corresponding to thecurrent block is determined as a third transform pair; and when the modenumbers of the intra prediction mode information of the current blockare 36, 66, and even numbers between 36 and 66, the transform paircorresponding to the current block is determined as a fourth transformpair.

TABLE 15 Intra prediction mode information (mode number) Transform pair1 First transform pair 0, 3, 5, 7, ..., 63, 65 Second transform pair 2,4, 6, ..., 28, 30, 32, 34 Third transform pair 36, 38, 40, 42, ..., 64,66 Fourth transform pair

In some possible embodiments of the present disclosure, there are twocombinations of the first transform pair to the fourth transform pair.The corresponding description may be as follows.

The first transform pair is (DCT2, DCT2), the second transform pair is(DST7, DST7), the third transform pair is (DST7, DCT2), and the fourthtransform pair is (DCT2, DST7); or the first transform pair is (DCT2,DCT2), the second transform pair is (DST7, DST7), the third transformpair is (DST7, DCT8), and the fourth transform pair is (DCT8, DST7).

In some possible embodiments of the present disclosure, when thetransform pair is determined based on the intra prediction modeinformation, the intra prediction mode range is further considered. Thecorresponding process may include: determining the transform paircorresponding to the intra prediction mode information as the transformpair corresponding to the current block when it is determined, based onthe size information, that the current block fails to satisfy the targetdimension constraint condition and that the intra prediction modeinformation satisfies the intra prediction mode range.

The intra prediction mode range may be preset, and stored in thedecoding device. The intra prediction mode range includes intraprediction modes with mode numbers of 0, 1, and 31 to 37; or the intraprediction mode range includes intra prediction modes with mode numbersof 0 and 1; or the intra prediction mode range includes intra predictionmodes with mode numbers of 0, 1, 3, 65, and odd numbers between 3 and65.

In practice, in response to acquiring the mode number of the intraprediction mode information from the coded data, the decoding device maydetermine whether the mode number is within the intra prediction moderange; and a transform pair corresponding to the intra prediction modeinformation as the transform pair corresponding to the current block maybe directly determined from corresponding relationships between theintra prediction mode information and the transform pairs when the modenumber is within the intra prediction mode range.

In some possible embodiments of the present disclosure, when a modenumber of the intra prediction mode information of the current block isnot within the intra prediction mode range, the following processingfashions may be employed.

In a first fashion, as listed in Table 16, the intra prediction moderange includes intra prediction mode information with mode numbers of 0,1, and 31 to 37. The width of the current block is represented by W, andthe height of the current block is represented by H.

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 30, 39, 41, 43, .. . , 65 is (DST7, DCT2) (the first ellipsis represents even numbersbetween 6 and 30, and the second ellipsis represents odd numbers between43 and 65).

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, 7, . . . , 29, 38, 40, 42, .. . , 66 is (DCT2, DST7) (the first ellipsis represents odd numbersbetween 7 and 29, and the second ellipsis represents even numbersbetween 42 and 66).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+1, B+3, . . . ,30, 3, 5, B, 39, 41, 43, . . . , 65 is (DST7, DCT2) (the first ellipsisrepresents even numbers between B+3 and 30, the second ellipsisrepresents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 43 and 65).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+2, B+4, . . . ,29, 38, 40, . . . , 66, 2, 4, . . . , (B−1) is (DCT2, DST7) (the firstellipsis represents odd numbers between B+4 and 29, the second ellipsisrepresents even numbers between 40 and 66, and the third ellipsisrepresents even numbers between 4 and (B−1)).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 2, 4, 6, . . . , 30,(B+1), (B+3), . . . , 66, 39, 41, . . . , (B−2) is (DST7, DCT2) (thefirst ellipsis represents even numbers between 6 and 30, the secondellipsis represents even numbers between (B+3) and 66, and the thirdellipsis represents odd numbers between 41 and B−2).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 3, 5, . . . , 29, B,B+2, 65, 38, 40, . . . , (B−1) is (DCT2, DST7) (the first ellipsisrepresents odd numbers between 5 and 29, the second ellipsis representsodd numbers between (B+2) and 65, and the third ellipsis represents evennumbers between 40 and (B−1)).

TABLE 16 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1, 33, 35DCT2 DCT2 0, 31, 32, 34, 36, 37 DST7 DST7 W = H 2, 4, 6, ..., 30 DST7DCT2 39, 41, 43, ..., 65 W > H B + 1, B + 3, ..., 30 3, 5, ..., B 39,41, 43, ..., 65 W < H 2, 4, 6, ..., 30 B + 1, B + 3, ..., 66 39, 41,..., B − 2 W = H 3, 5, 7, ..., 29 DCT2 DST7 38, 40, 42, ..., 66 W > HB + 2, B + 4, ..., 29 38, 40, ..., 66 2, 4, ..., (B − 1) W < H 3, 5,..., 29 B, B + 2, ..., 65 38, 40, ..., (B − 1)

In a second fashion, as listed in Table 17, the intra prediction moderange includes intra prediction mode information with mode numbers of 0,1, and 31 to 37. The width of the current block is represented by W, andthe height of the current block is represented by H.

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 30, 39, 41, 43, .. . , 65 is (DST7, DCT2) (the first ellipsis represents even numbersbetween 6 and 30, and the second ellipsis represents odd numbers between43 and 65).

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, 7, . . . , 29, 38, 40, 42, .. . , 66 is (DCT2, DST7) (the first ellipsis represents odd numbersbetween 7 and 29, and the second ellipsis represents even numbersbetween 42 and 66).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+1, B+3, . . . ,30, 3, 5, B, 39, 41, 43, . . . , 65 is (DST7, DCT2) (the first ellipsisrepresents even numbers between B+3 and 30, the second ellipsisrepresents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 43 and 65).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+2, B+4, . . . ,29, 38, 40, . . . , 66, 2, 4, . . . , (B−1) is (DCT2, DST7) (the firstellipsis represents odd numbers between B+4 and 29, the second ellipsisrepresents even numbers between 40 and 66, and the third ellipsisrepresents even numbers between 4 and (B−1)).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 2, 4, 6, . . . , 30,B+1, B+3, . . . , 66, 39, 41, . . . , (B−2) is (DST7, DCT2) (the firstellipsis represents even numbers between 6 and 30, the second ellipsisrepresents even numbers between (B+3) and 66, and the third ellipsisrepresents odd numbers between 41 and (B−2)).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 3, 5, . . . , 29, B,(B+2), 65, 38, 40, . . . , (B−1) is (DCT2, DST7) (the first ellipsisrepresents odd numbers between 5 and 29, the second ellipsis representsodd numbers between (B+2) and 65, and the third ellipsis represents evennumbers between 40 and (B−1)).

TABLE 17 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20, 31, 32, 33, 34, 35, 36, 37 DST7 DST7 W = H 2, 4, 6, ..., 30 DST7 DCT239, 41, 43, ..., 65 W > H B + 1, B + 3, ..., 30 3, 5, ..., B 39, 41, 43,..., 65 W < H 2, 4, 6, ..., 30 B + 1, B + 3, ..., 66 39, 41, ..., B − 2W = H 3, 5, 7, ..., 29 DCT2 DST7 38, 40, 42, ..., 66 W > H B + 2, B + 4,..., 29 38, 40, ..., 66 2, 4, ..., (B − 1) W < H 3, 5, ..., 29 B, B + 2,..., 65 38, 40, ..., (B − 1)

In a third fashion, the intra prediction mode range includes intraprediction mode information with mode numbers of 0 and 1. As listed inTable 18, the width of the current block is represented by W, and theheight of the current block is represented by H.

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 34, 35, 37, 39,41, 43, . . . , 65 is (DST7, DCT2) (the first ellipsis represents evennumbers between 6 and 34, and the second ellipsis represents odd numbersbetween 43 and 65).

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 3, 5, 7, . . . , 33, 36, 38, 40, .. . , 66 is (DCT2, DST7) (the first ellipsis represents odd numbersbetween 7 and 33, and the second ellipsis represents even numbersbetween 40 and 66).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of (B+1), (B+3), . .. , 34, 3, 5, B, 35, 37, 39, . . . , 65 is (DST7, DCT2) (the firstellipsis represents even numbers between (B+3) and 34, the secondellipsis represents odd numbers between 5 and B, and the third ellipsisrepresents odd numbers between 39 and 65).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+2, B+4, . . . ,33, 2, 4, . . . , (B−1), 36, 38, . . . , 66 is (DCT2, DST7) (the firstellipsis represents odd numbers between (B+4) and 33, the secondellipsis represents even numbers between 4 and (B−1), and the thirdellipsis represents odd numbers between 38 and 66).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 2, 4, 6, . . . , 34,(B+1), (B+3), . . . , 66, 35, 37, 39, . . . , (B−2) is (DST7, DCT2) (thefirst ellipsis represents even numbers between 6 and 34, the secondellipsis represents even numbers between (B+3) and 66, and the thirdellipsis represents odd numbers between 39 and (B−2)).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 3, 5, . . . , 33, B,(B+2), 65, 36, 38, . . . , (B−1) is (DCT2, DST7) (the first ellipsisrepresents odd numbers between 5 and 33, the second ellipsis representsodd numbers between (B+2) and 65, and the third ellipsis represents evennumbers between 38 and (B−1)).

TABLE 18 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20 DST7 DST7 W = H 2, 4, 6, ..., 34 DST7 DCT2 35, 37, 39, ..., 65 W > HB + 1, B + 3, ..., 34 3, 5, ..., B 35, 37, 39, ..., 65 W < H 2, 4, 6,..., 34 B + 1, B + 3, ..., 66 35, 37, 39, ..., B − 2 W = H 3, 5, 7, ...,33 DCT2 DST7 36, 38, 40, 42, ..., 66 W > H B + 2, B + 4, ..., 33 36, 38,..., 66 2, 4, ..., (B − 1) W < H 3, 5, ..., 33 B, B + 2, ..., 65 36, 38,..., (B − 1)

In a fourth fashion, the intra prediction mode range includes intraprediction mode information with mode numbers of 0, 1, 3, 65, and oddnumbers between 3 and 65. As listed in Table 19, the width of thecurrent block is represented by W, and the height of the current blockis represented by H.

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 2, 4, 6, . . . , 34 is (DST7,DCT2) (the ellipsis represents even numbers between 6 and 34).

When the ratio of the width to the height of the current block is 1(i.e., W=H), the transform pair corresponding to the intra predictionmode information with mode numbers of 36, 38, 40, . . . , 66 is (DCT2,DST7) (the ellipsis represents even numbers between 40 and 66).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of B+1, B+3, . . . ,34 is (DST7, DCT2) (the ellipsis represents even numbers between (B+3)and 34).

When the ratio of the width to the height of the current block isgreater than 1 (i.e., W>H), the transform pair corresponding to theintra prediction mode information with mode numbers of 36, 38, . . . ,66, 2, 4 . . . , (B−1) is (DCT2, DST7) (the first ellipsis representseven numbers between 38 and 66, and the second ellipsis represents evennumbers between 4 and (B−1).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 2, 4, 6, . . . , 34,B+1, B+3, . . . , 66 is (DST7, DCT2) (the first ellipsis represents evennumbers between 6 and 34, and the second ellipsis represents evennumbers between (B+3) and 66).

When the ratio of the width to the height of the current block is lessthan 1 (i.e., W<H), the transform pair corresponding to the intraprediction mode information with mode numbers of 36, 38, . . . , (B−1)is (DCT2, DST7) (the ellipsis represents even numbers between 38 and(B−1)).

TABLE 19 Transform pair Intra prediction Horizontal Vertical modeinformation transform transform (mode number) kernel kernel 1 DCT2 DCT20, 3, 5, 7, ..., 63, 65 DST7 DST7 W = H 2, 4, 6, ..., 34 DST7 DCT2 W > HB + 1, B + 3, ..., 34 W < H 2, 4, 6, ..., 34 B + 1, B + 3, ..., 66 W = H36, 38, 40, 42, ..., 66 DCT2 DST7 W > H 36, 38, ..., 66 2, 4, ..., (B− 1) W < H 36, 38, ..., (B − 1)

It should be noted that Table 16 to Table 19 take the influence of theintra prediction mode being a wide angle mode into consideration,wherein B in the wide angle mode is determined by the ratio of the widthto height of the current block. In Table 7 to Table 10, when W/H=2, 4,6, and 8, the corresponding B is 7, 11, 13, and 15; and when W/H=1/2,1/4, 1/6, 1/8, the corresponding B is 61, 57, 55, 53.

It should also be noted that, in Table 7 to Table 10, the intraprediction modes with adjacent mode numbers generally correspond todifferent transform pairs.

Corresponding to the decoding shown in FIG. 12 , as shown in FIG. 13 , acoding process may include the following steps.

In step 1301, a coding device acquires residual data of a current block.

In practice, the coding device performs intra prediction first whencoding video data, to acquire residual data (the method for acquiringthe residual data is consistent with the existing video codingstandards, which is not repeated). The residual data is taken as theresidual data of the current block to be processed.

In step 1302, the coding device determines intra prediction modeinformation of subblocks of the current block and size information ofthe subblocks of the current block based on subblock partitioninformation of the current block when the current block satisfies asubblock partition condition and intra subblock partitioning isactivated.

The subblock partition information indicates how to partition thecurrent block. For example, for an 8*4 current block, it may behorizontally partitioned into two 8*2 subblocks.

In practice, in response to acquiring the residual data of the currentblock, the coding device may determine whether the current blocksatisfies the subblock partition condition; and determine whether theintra subblock partitioning is activated when the subblock partitioncondition is satisfied. When a switch for intra subblock partitioning ispowered on, it is indicated that the intra subblock partitioning may beactivated and the current block can be partitioned. The heights andwidths of the subblocks acquired by partitioning the current block arethen determined. The width of the current block is the number of pixelscontained in the current block in its width direction, the height of thecurrent block is the number of pixels contained in the current block inits height direction, the width of each subblock is the number of pixelscontained in the subblock in its width direction, and the height of eachsubblock is the number of pixels contained in the subblock in its heightdirection. In this way, the size information of each subblock can beacquired. For a current block of M×N, M represents the width of thecurrent block, and N represents the height of the current block.

In addition, the content of a flag bit configured to indicate the intraprediction mode information may be acquired from the coded data of thecurrent block, that is, the intra prediction mode information of thecurrent block may be acquired.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block and theheight and the width of the current block are both less than or equal toa first preset value, and the current block is a single-line referencewhen being subjected to intra prediction, and the number of pixelsincluded in the current block is greater than a second preset value.

The first preset value may be preset and stored in the coding device(the same as the third value as mentioned above). The first preset valuemay be 64. The current block being the single-line reference during theintra prediction means that only one line is referenced during the intraprediction of the current block. The second preset value may be presetand stored in the coding device. The second preset value may be 16 (thesame as the fourth value as mentioned above).

In step 1303, the coding device determines, based on the sizeinformation of the subblock and the intra prediction mode information ofthe subblock, a transform pair corresponding to each subblock.Determining, based on the size information of the subblock and the intraprediction mode information of the subblock, the transform pair of eachsubblock includes: determining a transform pair corresponding to theintra prediction mode information of each subblock as a transform paircorresponding to the subblock when it is determined, based on the sizeinformation of the subblock, that the subblock fails to satisfy adimension constraint condition, wherein the dimension constraintcondition is that the width is not within a first preset range, and theheight is not within a second preset range.

In practice, step 1303 is completely the same as step 1203, which is notrepeated here.

It should be noted that determining the transform pair corresponding tothe subblock based on the size information of the subblock and the intraprediction mode information of the subblock by the coding device iscompletely the same as determining the transform pair corresponding tothe subblock based on the size information of the subblock and the intraprediction mode information of the subblock the decoding device in theembodiment shown in FIG. 12 . For details, reference is made to theprocess in FIG. 12 , which is not repeated here.

In step 1304, the coding device performs a transform on residual data ofthe subblocks based on the transform pairs corresponding to thesubblocks.

In practice, after the coding device determines the transform pairscorresponding to the subblocks, a transform coefficient corresponding tothe subblock is acquired by transforming each subblock based on thetransform pair corresponding to the subblock; then a quantizationcoefficient is acquired by quantizing the transform coefficient; andcoded data corresponding to the subblock is acquired by entropy codingthe quantization coefficient.

In this way, the coded data corresponding to the current block can beacquired based on the above processing for each subblock, such that thecoding of the current block is completed. Each current block isprocessed in accordance with the process shown in FIG. 13 , so as tocode a whole segment of video data.

In some possible embodiments of the present disclosure, in order toquickly perform subblock partitioning on the current block by thedecoding device, the following process may be performed: acquiring thesubblock partition information of the current block when the currentblock satisfies the subblock partition condition; and adding thesubblock partition information to coded data of the current block.

In practice, the coding device may acquire the subblock partitioninformation of the current block when the current block satisfies thesubblock partition condition; and add the subblock partition informationto the coded data of the current block. In this way, the decoding devicemay subsequently acquire, from the coded data of the current block, thesubblock partition information of the current block for decoding.

In response to acquiring the current block, the coding device maydetermine the intra prediction mode information of the current blockbased on the RDO criterion. The process may be as follows.

Generally speaking, there are two major indicators for evaluating thecoding efficiency: code rate and peak signal to noise ratio (PSNR).Generally, the smaller a bit stream is, the greater a compression rateis; the greater the PSNR is, the better the quality of a reconstructedimage is. In the case of making mode selection, a discriminant formulais essentially a comprehensive evaluation of the two indicators.

The rate-distortion cost corresponding to a mode is J(mode)=D+λ*R. Drepresents Distortion, which is generally measured by a squares error(SSE) indicator; SSE refers to a sum of squares error between areconstructed block and a source image; λ is a Lagrange multiplier; andR is an actual number of bits required for image block coding in thismode, including the sum of bits required for coding mode information,motion information, residuals, etc.

The coding device may perform intra prediction by each intra predictionmode information to acquire different residuals (which may be consideredas the current block); then perform a transform by a transform paircorresponding to each intra prediction mode information, followed byquantization, entropy coding and decoding; then select the intraprediction mode information with the smallest rate-distortion cost; anddetermine this intra prediction mode information as the intra predictionmode information corresponding to the current block. In this way, theintra prediction mode information corresponding to the current block canbe determined.

In addition, after the intra prediction mode information of the currentblock is acquired, a mode number of the intra prediction modeinformation may be added to the subsequent coded data for processing thecurrent block.

It should be noted that, in order to save the coding time, thepartitioned intra subblocks share the intra prediction mode informationof the current block.

In addition, in the embodiments of the present disclosure, the processfor acquiring the subblock partition information by the coding device isalso provided.

The coding device may partition the current block horizontally orvertically into several small subblocks. For example, for a 16*8 currentblock, it may be partitioned into four 16×2 subblocks horizontally orinto four 4*8 subblocks vertically. However, for a 4*8 block, it may bepartitioned into two 4*4 subblocks or two 2*8 subblocks. It may be notedthat the number of subblocks can be only 2 (for 4*8, 8*4 subblocks). Inaddition, each subblock contains at least 16 pixels, such that the 4*4block is not partitioned again, and there is no need to makecorresponding grammar declarations at the coding device and the decodingdevice. The specific partitioning rules are shown in Table 3 shown inFIG. 9 . As for whether to partition horizontally or vertically, itneeds to be determined by the coding device based on a RDO criterion. Inorder to save the coding time, the partitioned intra subblocks share anintra prediction mode of the current block (that is, the subblocksobtained by partitioning the current block have the same intraprediction mode as the current block).

The current block may be partitioned horizontally and verticallyaccording to Table 3. For example, as shown in FIG. 11 , for an 8*4current block, it may be horizontally partitioned into two 8*2subblocks, or be vertically partitioned into two 4*4 subblocks.

Determining the subblock partition information based on the RDOcriterion may include: determining a plurality of split types of thecurrent block first according to Table 3; then performing codingaccording to each split type; and then performing decoding to determinethe split type with the least rate-distortion cost as the final splittype of the current block. In this way, the subblock partitioninformation of the current block is acquired. The subblock partitioninformation of the current block is subsequently added to the coded dataof the current block.

It should be noted that, in the aforementioned embodiment, after thecurrent block is partitioned, the subblocks have the same width and thesame height, as well as the same intra prediction mode information, andthus the determined transform pairs are also the same.

In the embodiments of the present disclosure, at the coding device, thetransform pairs corresponding to the subblocks are determined directlybased on the intra prediction mode of the current block and the sizeinformation of the subblocks; and the determined transform pairs arecoded. Similarly, at the decoding device, the transform pairscorresponding to the subblocks are determined directly based on theintra prediction mode of the current block and the size information ofthe subblocks; and the determined transform pairs are decoded. In thisway, since the transform pairs are determined based on the intraprediction mode of the current block and the size information of thesubblocks, instead of using the same transform pair for all subblocks,the coding and decoding performance can be improved. Moreover, theselection of the transform pairs based on the intra prediction mode cansave the selection time of the transform pairs and further improve thecoding and decoding performance.

It should be noted that, for the aforementioned two embodiments fordecoding, when the current block is partitioned horizontally, thesubblocks of the current block are uniformly subjected to entropydecoding in sequence from top to bottom to acquire quantizationcoefficients of the subblocks. Then, the subblocks of the current blockare subjected to inverse quantization and inverse transform in sequencefrom top to bottom to acquire residual data of the subblocks. Finally,pixel values of pixels in a reconstructed area around the current blockare used to construct, based on an intra prediction mode used duringcoding, prediction signals of the subblocks in sequence from top tobottom. Reconstruction information of each subblock is acquired byadding up the residual data of the subblock and the correspondingprediction signal. In this way, reconstruction information correspondingto the current block can be acquired by merging the reconstructioninformation of the subblocks.

When the current block is partitioned vertically, subblocks of thecurrent block are uniformly subjected to entropy decoding in sequencefrom left to right to acquire quantization coefficients of thesubblocks. Then, the subblocks of the current block are subjected toinverse quantization and inverse transform in sequence from left toright to acquire residual data of the subblocks. Finally, pixel valuesof pixels in a reconstructed area around the current block are used toconstruct, based on an intra prediction mode used during coding,prediction signals of the subblocks in sequence from left to right.Reconstruction information of each subblock is acquired by adding up theresidual data of the subblock and the corresponding prediction signal.In this way, reconstruction information corresponding to the currentblock can be acquired by merging the reconstruction information of thesubblocks.

It should also be noted that, for the aforementioned two embodiments forcoding, when the current block is partitioned horizontally, thesubblocks in the first line of the current block are respectivelypredicted, transformed, quantized, and entropy-coded first in thesequence of lines; and the subblocks in the second line are respectivelypredicted, transformed, quantized, and entropy-coded in the sequence oflines, and the third subblock, the fourth subblock, etc. are processedsequentially from top to bottom. The reason for coding in this way isthat reference pixels for intra prediction of the next subblock dependon the reconstruction information of the previous subblock. Therefore,when the next subblock is predicted, the previous subblock has completedthe prediction, transform, quantization, and entropy coding, and thereconstruction information has been acquired.

When the current block is partitioned vertically, the first subblock onthe leftmost side of the current block is predicted, transformed,quantized, and entropy-coded first in the sequence of columns; and thesubblocks in the second column from the left side are respectivelypredicted, transformed, quantized, and entropy-coded in the sequence ofcolumns, and the third subblock, the fourth subblock, and the like areprocessed sequentially from left to right. The reason for coding in thisway is that reference pixels for the intra prediction of the subblock onthe right side depend on the reconstruction information of the previoussubblock. Therefore, when one subblock on the right side is predicted,the left subblock has completed the prediction, transform, quantization,and entropy coding, and the reconstruction information has beenacquired.

It should also be noted that the embodiments of the coding device shownin FIG. 10 and FIG. 13 are all improvements to the transform process.During the intra prediction, the entire current block is used to performintra prediction. After the residual data is acquired, the current blockis partitioned into subblocks, and the residual data of the subblocksare subjected to transform. During the intra prediction, it is alsoavailable to directly partition the current block into subblocks forintra prediction, so as to acquire residual data of the subblocks, andthe residual data of the subblocks are subjected to transform. Thecoding device of the aforementioned embodiments of the presentdisclosure is applicable to the above two fashions. Similarly, theinverse transform of the decoding device is also applicable to the twofashions.

It should also be noted that in the aforementioned several embodiments,the activation of intra subblock partitioning refers to activation of anintra subblock split type. The subblock partition information may be asubblock split type, that is, a subblock split type determined in thecandidate subblock split types supported by the current block. Theabove-mentioned subblock partition information may not be added to thecoded data, that is, a flag bit is not occupied. For example, when onlyhorizontal partitioning is activated, the decoding device performshorizontal partitioning while performing subblock partitioning.Similarly, when only vertical partitioning is activated, the decodingdevice performs vertical partitioning while performing subblockpartitioning. Only when both horizontal partitioning and verticalpartitioning are activated, an additional indication is added to thecoded data, such that network resources can be saved.

Based on the same technical concept, an embodiment of the presentdisclosure further provides a decoding device. As shown in FIG. 14 , thedecoding device includes:

an acquiring module 1410, configured to acquire coded data of a currentblock;

a determining module 1420, configured to: determine size information andshape information of subblocks based on subblock partition informationof the current block when the current block satisfies a subblockpartition condition and it is determined, based on the coded data of thecurrent block, that the current block activates intra subblockpartition; and determine, based on the size information and the shapeinformation of each subblock, a transform pair corresponding to thesubblock; and

a transforming module 1430, configured to perform an inverse transformon inversely quantized data of the subblocks based on the transformpairs corresponding to the subblocks;

wherein the determining module 1420 is configured to: determine DST7 asa horizontal transform kernel in the transform pair corresponding to thesubblock when a width of the subblock satisfies a first dimensionconstraint condition and a shape of the subblock satisfies a firstcondition; and determine DST7 as a vertical transform kernel in thetransform pair corresponding to the subblock when a height of thesubblock satisfies a second dimension constraint condition and the shapeof the subblock satisfies a second condition.

In some possible embodiments of the present disclosure, the determiningmodule 1420 is further configured to: determine DCT2 as a horizontaltransform kernel in the transform pair corresponding to the subblockwhen the width of the subblock fails to satisfy the first dimensionconstraint condition and/or the shape of the subblock fails to satisfythe first condition; and determine DCT2 as a vertical transform kernelin the transform pair corresponding to the subblock when the height ofthe subblock fails to satisfy the second dimension constraint conditionand/or the shape of the subblock fails to satisfy the second condition.

In some possible embodiments of the present disclosure, the firstdimension constraint condition and the second dimension constraintcondition are greater than or equal to a first value, and less than orequal to a second value; the first condition is that the width is lessthan or equal to the height, and the second condition is that the widthis greater than or equal to the height; or the first dimensionconstraint condition and the second dimension constraint condition aregreater than or equal to a first value, and less than or equal to asecond value; the first condition is that the width is less than theheight, and the second condition is that the width is greater than theheight.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block, theheight and the width of the current block are both less than or equal toa third value, the current block is a single-line reference duringperforming intra prediction, and a number of pixels included in thecurrent block is greater than a fourth value.

Based on the same technical concept, an embodiment of the presentdisclosure further provides a coding device. As shown in FIG. 15 , thecoding device includes:

an acquiring module 1510, configured to acquire residual data of acurrent block;

a determining module 1520, configured to: determine size information andshape information of subblocks of the current block based on subblockpartition information of the current block when the current blocksatisfies a subblock partition condition and subblock partition isactivated; and determine a transform pair corresponding to each subblockbased on the size information and shape information of the subblock; and

a transforming module 1530, configured to perform a transform onresidual data of the subblocks based on the transform pairscorresponding to the subblocks;

wherein the determining module 1520 is configured to: determine DST7 asa horizontal transform kernel in the transform pair corresponding to thesubblock when a width of the subblock satisfies a first dimensionconstraint condition and a shape of the subblock satisfies a firstcondition; and determine DST7 as a vertical transform kernel in thetransform pair of the subblock when a height of the subblock satisfies asecond dimension constraint condition and the shape of the subblocksatisfies a second condition.

In some possible embodiments of the present disclosure, the acquiringmodule 1510 is further configured to: acquire the subblock partitioninformation of the current block when the current block satisfies thesubblock partition condition; and add the subblock partition informationto coded data of the current block.

In the embodiments of the present disclosure, at the coding device, thetransform pairs corresponding to the subblocks are determined directlybased on the size information and shape information of the subblocks ofthe current block; and the determined transform pairs are coded.Similarly, at the decoding device, the transform pairs corresponding tothe subblocks are determined directly based on the size information andshape information of the subblocks of the current block; and thedetermined transform pairs are decoded. In this way, since the transformpairs are determined based on the size information and shapeinformation, instead of using the same transform pair for all subblocks,the coding and decoding performance can be improved. Moreover, when thetransform pairs are derived, only the heights and widths are used, suchthat the derivation is simpler, and the coding and decoding performancecan be further improved.

Based on the same technical concept, an embodiment of the presentdisclosure further provides a decoding device. As shown in FIG. 16 , thedecoding device includes:

an acquiring module 1610, configured to acquire coded data of a currentblock;

a determining module 1620, configured to: when the current blocksatisfies a subblock partition condition and it is determined, based onthe coded data of the current block, that the current block activatesintra-subblock partition, determine size information of subblocks basedon subblock partition information of the current block, and determiningintra prediction mode information of the subblocks; and determine, basedon the size information and the intra prediction mode information ofeach subblock, a transform pair corresponding to the subblock; and

a transforming module 1630, configured to perform an inverse transformon inversely quantized data of the subblocks based on the transformpairs corresponding to the subblocks;

wherein the determining module 1620 is configured to: determine atransform pair corresponding to the intra prediction mode information ofeach subblock as the transform pair corresponding to the subblock whenit is determined, based on the size information of the subblock, thatthe subblock fails to satisfy a dimension constraint condition, whereinthe dimension constraint condition is that a width is not within apreset value range, and a height is not within the preset value range.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is further configured to:

when it is determined, based on the size information of the subblock,that the height of the subblock satisfies the dimension constraintcondition and the width of the subblock fails to satisfy the dimensionconstraint condition, determine DCT2 as a vertical transform kernel inthe transform pair corresponding to the subblock, and determine ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a horizontaltransform kernel in the transform pair corresponding to the subblock;

when it is determined, based on the size information of the subblock,that the width of the subblock satisfies the dimension constraintcondition and the height of the subblock fails to satisfy the dimensionconstraint condition, determine DCT2 as a horizontal transform kernel inthe transform pair corresponding to the subblock, and determine avertical transform kernel in the transform pair corresponding to theintra prediction mode information of the subblock as a verticaltransform kernel in the transform pair of the subblock; and

determine DCT2 as a vertical transform kernel and a vertical transformkernel in the transform pair corresponding to the subblock when it isdetermined, based on the size information of the subblock, that both theheight and the width of the subblock satisfy the dimension constraintcondition.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is configured to: determine the transform pair correspondingto the subblock as (DCT2, DCT2) when mode numbers of the intraprediction mode information of the subblock are 1, 33, 35; determine thetransform pair corresponding to the subblock as (DST7, DST7) when themode numbers of the intra prediction mode information of the subblockare 0, 31, 32, 34, 36, 37; determine the transform pair corresponding tothe subblock as (DST7, DCT8) when the mode numbers of the intraprediction mode information of the subblock are 2, 30, even numbersbetween 2 and 30, 39, 65, and odd numbers between 39 and 65; anddetermine the transform pair corresponding to the subblock as (DCT8,DST7) when the mode numbers of the intra prediction mode information ofthe subblock are 3, 29, odd numbers between 3 and 29, 38, 66, and evennumbers between 38 and 66.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is configured to: determine the transform pair correspondingto the subblock as a first transform pair when a mode number of theintra prediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode numbers of the intra prediction mode information of thesubblock are 0, 31, 32, 33, 34, 35, 36, 37; determine the transform paircorresponding to the subblock as a third transform pair when the modenumbers of the intra prediction mode information of the subblock are 2,30, even numbers between 2 and 30, 39, 65, and odd numbers between 39and 65; and determine the transform pair corresponding to the subblockas a fourth transform pair when the mode numbers of the intra predictionmode information of the subblock are 3, 29, odd numbers between 3 and29, 38, 66, and even numbers between 38 and 66.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is configured to: determine the transform pair correspondingto the subblock as a first transform pair when a mode number of theintra prediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode number of the intra prediction mode information of thesubblock is 0; determine the transform pair corresponding to thesubblock as a third transform pair when the mode numbers of the intraprediction mode information of the subblock are 2, 34, even numbersbetween 2 and 34, 35, 65, and odd numbers between 35 and 65; anddetermine the transform pair corresponding to the subblock as a fourthtransform pair when the mode numbers of the intra prediction modeinformation of the subblock are 3, 33, odd numbers between 3 and 33, 36,66, and even numbers between 36 and 66.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is configured to: determine the transform pair correspondingto the subblock as a first transform pair when the mode number of theintra prediction mode information of the subblock is 1; determine thetransform pair corresponding to the subblock as a second transform pairwhen the mode numbers of the intra prediction mode information of thesubblock are to 0, 3, 65, and odd numbers between 3 and 65; determinethe transform pair corresponding to the subblock as a third transformpair when the mode numbers of the intra prediction mode information ofthe subblock are 2, 34, and even numbers between 2 and 34; and determinethe transform pair corresponding to the subblock as a fourth transformpair when the mode numbers of the intra prediction mode information ofthe subblock are 36, 66, and even numbers between 36 and 66.

In some possible embodiments of the present disclosure, the firsttransform pair is (DCT2, DCT2), the second transform pair is (DST7,DST7), the third transform pair is (DST7, DCT2), and the fourthtransform pair is (DCT2, DST7); or the first transform pair is (DCT2,DCT2), the second transform pair is (DST7, DST7), the third transformpair is (DST7, DCT8), and the fourth transform pair is (DCT8, DST7).

In some possible embodiments of the present disclosure, the determiningmodule 1620 is configured to: determine the transform pair correspondingto the intra prediction mode information as the transform paircorresponding to each subblock when it is determined, based on the sizeinformation of the subblock, that the subblock fails to satisfy thedimension constraint condition and that the intra prediction modeinformation of the subblock satisfies an intra prediction mode range.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is further configured to: determine a ratio of a width to aheight of each subblock based on the size information of the subblockwhen it is determined, based on the size information of the subblock,that the subblock fails to satisfy the dimension constraint conditionand that the intra prediction mode information of the subblock fails tosatisfy the intra prediction mode range; and determine, based on theratio of the width to the height of the subblock and the intraprediction*mode information of the subblock, the transform paircorresponding to the subblock.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; or the intra prediction mode rangeincludes intra prediction mode information with mode numbers of 0 and 1;or the intra prediction mode range includes intra prediction modeinformation with mode numbers of 0, 1, 3, 65, and odd numbers between 3and 65.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, and 31 to 37; and

the determining module 1620 is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, 39, 41, 43, 65, even numbers between 6 and30, and odd numbers between 43 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is equal to 1 and the modenumbers of the intra prediction mode information are 3, 5, 7, 29, andodd numbers between 7 and 29;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 30, 3, 5, B, 39, 41, 43, 65, evennumbers between (B+3) and 30, odd numbers between 5 and B, and oddnumbers between 43 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are B+2, B+4, 29, 38,40, 66, 2, 4, (B−1), odd numbers between B+4 and 29, even numbersbetween 40 and 66, and even numbers between 4 and (B−1); and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 30, (B+1), (B+3), 66, 39, 41, (B−2), evennumbers between 6 and 30, even numbers between (B+3) and 66, and oddnumbers between 41 and (B−2); and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 29, B, (B+2),65, 38, 40, (B−1), odd numbers between 5 and 29, odd numbers between(B+2) and 65, and even numbers between 40 and (B−1);

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0 and 1; and

the determining module 1620 is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, 35, 37, 39, 41, 43, 65, even numbersbetween 6 and 34, and odd numbers between 43 and 65; and determine thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is equal to 1and the mode numbers of the intra prediction mode information are 3, 5,7, 33, 36, 38, 40, 66, odd numbers between 7 and 33, and odd numbersbetween 40 and 66;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, 3, 5, B, 35, 37, 39, 65, evennumbers between (B+3) and 34, odd numbers between 5 and B, and oddnumbers between 39 and 65; and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is greater than 1 and the modenumbers of the intra prediction mode information are (B+2), (B+4), 33,2, 4, (B−1), 36, 38, 66, odd numbers between (B+4) and 33, even numbersbetween 4 and (B−1), and even numbers between 38 and 66; and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, 35, 37, 39, (B−2), evennumbers between 6 and 34, odd numbers between (B+3) and 66, and oddnumbers between 39 and (B−2); and determine the transform paircorresponding to the current block as (DCT2, DST7) when the ratio of thewidth to the height of the current block is less than 1 and the modenumbers of the intra prediction mode information are 3, 5, 33, B, (B+2),65, 36, 38, (B−1), odd numbers between 5 and 33, odd numbers between(B+2) and 65, and even numbers between 38 and (B−1); and

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the intraprediction mode range includes intra prediction mode information withmode numbers of 0, 1, 3, 65, and odd numbers between 3 and 65; and

the determining module 1620 is further configured to:

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, and even numbers between 6 and 34; anddetermine the transform pair corresponding to the current block as(DCT2, DST7) when the ratio of the width to the height of the currentblock is equal to 1 and the mode numbers of the intra prediction modeinformation are 36, 38, 40, 66, and even numbers between 40 and 66;

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is greater than 1 and the mode numbers of the intra predictionmode information are (B+1), (B+3), 34, and even numbers between (B+3)and 34; and determine the transform pair corresponding to the currentblock as (DCT2, DST7) when the ratio of the width to the height of thecurrent block is greater than 1 and the mode numbers of the intraprediction mode information are 36, 38, 66, 2, 4, (B−1), even numbersbetween 38 and 66, and even numbers between 4 and (B−1); and

determine the transform pair corresponding to the current block as(DST7, DCT2) when the ratio of the width to the height of the currentblock is less than 1 and the mode numbers of the intra prediction modeinformation are 2, 4, 6, 34, (B+1), (B+3), 66, even numbers between 6and 34, and even numbers between (B+3) and 66; and determine thetransform pair corresponding to the current block as (DCT2, DST7) whenthe ratio of the width to the height of the current block is less than 1and the mode numbers of the intra prediction mode information are 36,38, (B−1), and even numbers between 38 and (B−1); and

wherein when the ratios of the width to the height of the current blockare 2, 4, 8, and 16, B is 7, 11, 13, and 15; and when the ratios of thewidth to the height of the current block are 1/2, 1/4, 1/8, and 1/16, Bis 61, 57, 55, 53.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is further configured to: determine, based on the sizeinformation and the intra prediction mode information of the currentblock, the transform pair corresponding to the current block when thecurrent block does not activate the intra subblock partitioning.

In some possible embodiments of the present disclosure, the determiningmodule 1620 is further configured to:

determine the transform pair corresponding to the intra prediction modeinformation as the transform pair corresponding to the current blockwhen it is determined, based on the size information, that the currentblock fails to satisfy a target dimension constraint condition, whereinthe target dimension constraint condition is that the width is greaterthan or equal to a target value, and the height is greater than or equalto the target value;

when it is determined, based on the size information, that the height ofthe current block satisfies the target dimension constraint conditionand the width of the current block fails to satisfy the target dimensionconstraint condition, determine DCT2 as a vertical transform kernel inthe transform pair corresponding to the current block, and determine ahorizontal transform kernel in the transform pair corresponding to theintra prediction mode information as a horizontal transform kernel inthe transform pair corresponding to the current block;

when it is determined, based on the size information, that the width ofthe current block satisfies the target dimension constraint conditionand the height of the current block fails to satisfy the targetdimension constraint condition, determine DCT2 as a horizontal transformkernel in the transform pair corresponding to the current block, anddetermine a vertical transform kernel in the transform paircorresponding to the intra prediction mode information as a verticaltransform kernel in the transform pair corresponding to the currentblock; and

determine DCT2 as a horizontal transform kernel and a vertical transformkernel in the transform pair corresponding to the current block when itis determined based on the size information, that both the width and theheight of the current block satisfy the target dimension constraintcondition.

In some possible embodiments of the present disclosure, the subblockpartition condition is that the current block is a luma block, theheight and the width of the current block are both less than or equal toa first preset value, the current block is a single-line referenceduring performing intra prediction, and a number of pixels included inthe current block is greater than a second preset value.

Based on the same technical concept, an embodiment of the presentdisclosure further provides a coding device. As shown in FIG. 17 , thecoding device includes:

an acquiring module 1710, configured to acquire residual data of acurrent block;

a determining module 1720, configured to: determine intra predictionmode information of subblocks of the current block and size informationof the subblocks of the current block based on subblock partitioninformation of the current block when the current block satisfies asubblock partition condition and intra subblock partitioning isactivated; and determine, based on the size information of the subblockand the intra prediction mode information of the subblock, a transformpair corresponding to each subblock; and

a transforming module 1730, configured to perform a transform onresidual data of the subblocks based on the transform pairscorresponding to the subblocks;

wherein the determining module 1720 is configured to: determine atransform pair corresponding to the intra prediction mode information ofeach subblock as a transform pair corresponding to the subblock when itis determined, based on the size information of the subblock, that thesubblock fails to satisfy a dimension constraint condition, wherein thedimension constraint condition is that a width is not within a firstpreset value range, and a height is not within a second preset valuerange.

In some possible embodiments of the present disclosure, the acquiringmodule 1710 is further configured to: acquire subblock partitioninformation of the current block when the current block satisfies thesubblock partition condition; and add the subblock partition informationto coded data of the current block.

In the embodiments of the present disclosure, at the coding device, thetransform pairs corresponding to the subblocks are determined directlybased on the intra prediction mode of the current block and the sizeinformation of the subblocks; and the determined transform pairs arecoded. Similarly, at the decoding device, the transform pairscorresponding to the subblocks are determined directly based on theintra prediction mode of the current block and the size information ofthe subblocks; and the determined transform pairs are decoded. In thisway, since the transform pairs are determined based on the intraprediction mode of the current block and the size information of thesubblocks, instead of using the same transform pair for all subblocks,the coding and decoding performance can be improved. Moreover, theselection of the transform pairs based on the intra prediction mode cansave the selection time of the transform pairs and further improve thecoding and decoding performance.

It should be noted: the decoding device according to the aboveembodiment performs decoding, only the partitioning of the abovefunctional modules is exemplified. In actual applications, the abovefunctions can be allocated to be completed by different functionalmodules as required. That is, the internal structure of the decodingdevice is partitioned into different functional modules to complete allor part of the functions described above. In addition, the decodingdevice according to the above embodiment and the decoding methodembodiment belong to the same concept, and the specific implementationis detailed in the method embodiments, which is not repeated herein.

It should be noted: when the coding device according to the aboveembodiment performs coding, only the partitioning of the abovefunctional modules is exemplified. In actual applications, the abovefunctions can be allocated to be completed by different functionalmodules as required. That is, the internal structure of the codingdevice is partitioned into different functional modules to complete allor part of the functions described above. In addition, the coding deviceaccording to the above embodiment and the coding method embodimentbelong to the same concept, and the specific implementation is detailedin the method embodiments, which is not repeated herein.

FIG. 18 is a schematic structural diagram of a coding device accordingto an embodiment of the present disclosure. The coding device 1800 canvary greatly depending on different configurations or performance, andmay include at least one central processing unit (CPU) 1801 and at leastone memory 1802. The memory 1802 is configured to store at least oneinstruction therein. The at least one instruction, when loaded and runby the processor 1801, causes the processor 1801 to perform the steps ofthe coding method.

FIG. 19 is a schematic structural diagram of a decoding device accordingto an embodiment of the present disclosure. The decoding device 1900 canvary greatly depending on different configurations or performance, andmay include at least one processor 1901 and at least one memory 1902.The memory 1902 is configured to store at least one instruction therein.The at least one instruction, when loaded and run by the processor 1901,causes the processor 1901 to perform the steps of the decoding method.

An embodiment of the present disclosure further provides acomputer-readable storage medium. The computer-readable storage mediumis configured to store a computer program therein. The computer program,when run by a processor, causes the processor to perform the steps ofthe coding and decoding methods.

An embodiment of the present disclosure further provides a codingdevice. The coding device includes a processor and a memory storing acomputer program therein. The computer program, when run by theprocessor, causes the processor to perform the steps of the codingmethod.

An embodiment of the present disclosure further provides a decodingdevice. The decoding device includes a processor and a memory storing acomputer program therein. The computer program, when run by theprocessor, causes the processor to perform the steps of the decodingmethod.

An embodiment of the present disclosure further provides a system forcoding and decoding. The system includes a coding device and a decodingdevice; wherein the coding device is the coding device that performscoding as described above; and the decoding device is the decodingdevice that performs decoding as described above.

It may be understood by a person of ordinary skill in the art that allor part of steps in the above embodiments may be completed by hardware,or a program instructing relevant hardware. The program may be stored ina computer-readable storage medium which includes a read-only memory, amagnetic disk, an optical disc or the like.

Described above are merely exemplary embodiments of the presentdisclosure, and are not intended to limit the present disclosure. Withinthe spirit and principles of the present disclosure, any modifications,equivalent substitutions, improvements, and the like should be withinthe protection scope of the present disclosure.

What is claimed is:
 1. A decoding method, comprising: acquiring codeddata of a current block; determining size information of subblocks basedon subblock partition information of the current block in response tothe current block satisfying a subblock partition condition anddetermining, based on the coded data of the current block, that thecurrent block activates intra subblock partition; determining, based onthe size information of each subblock, a transform pair corresponding tothe subblock; and performing an inverse transform on inversely quantizeddata of the subblocks based on the transform pairs corresponding to thesubblocks; wherein determining, based on the size information of theeach subblock, the transform pair corresponding to the subblockcomprises: determining Discrete Sine Transform-7 (DST7) as a horizontaltransform kernel in the transform pair corresponding to the subblock inresponse to a width of the subblock satisfying a first dimensionconstraint condition; determining Discrete Cosine Transform-2 (DCT2) asthe horizontal transform kernel in the transform pair corresponding tothe subblock in response to the width of the subblock failing to satisfythe first dimension constraint condition; determining DST7 as a verticaltransform kernel in the transform pair corresponding to the subblock inresponse to a height of the subblock satisfying a second dimensionconstraint condition; and determining DCT2 as the vertical transformkernel in the transform pair corresponding to the subblock in responseto the height of the subblock failing to satisfy the second dimensionconstraint condition; wherein the first dimension constraint conditionis that the width of the subblock is greater than or equal to 4 and lessthan or equal to 16; and the second dimension constraint condition isthat the height of the subblock is greater than or equal to 4 and lessthan or equal to
 16. 2. The decoding method according to claim 1,wherein the subblock partition condition comprises at least: the currentblock is a luma block, and the height and the width of the current blockare both less than or equal to a first preset value.
 3. The decodingmethod according to claim 1, wherein determining, based on the sizeinformation of the each subblock, the transform pair corresponding tothe subblock comprises: determining DST7 as the horizontal transformkernel in the transform pair corresponding to the subblock anddetermining DST7 as the vertical transform kernel in the transform paircorresponding to the subblock in response to the width of the subblockbeing equal to the height of the subblock, the width of the subblocksatisfying the first dimension constraint condition and the height ofthe subblock satisfying the second dimension constraint condition. 4.The decoding method according to claim 3, wherein both the width andheight of the subblock are equal to 4, or 8, or
 16. 5. The decodingmethod according to claim 1, wherein the width of the subblock satisfiesthe first dimension constraint condition and the height of the subblockfails to satisfy the second dimension constraint condition in responseto the width of the subblock being greater than or equal to 4 and lessthan or equal to 16 and the height of the subblock being equal to 32 or64.
 6. The decoding method according to claim 1, wherein the width ofthe subblock fails to satisfy the first dimension constraint conditionand the height of the subblock satisfies the second dimension constraintcondition in response to the height of the subblock being greater thanor equal to 4 and less than or equal to 16 and the width of the subblockbeing equal to 32 or
 64. 7. The decoding method according to claim 1,wherein the width of the subblock fails to satisfy the first dimensionconstraint condition and the height of the subblock fails to satisfy thesecond dimension constraint condition in response to the width of thesubblock being greater than 1 and less than 4 and the height of thesubblock being greater than 16; or the width of the subblock fails tosatisfy the first dimension constraint condition and the height of thesubblock fails to satisfy the second dimension constraint condition inresponse to the height of the subblock being greater than 1 and lessthan 4 and the width of the subblock being greater than 16; or the widthof the subblock fails to satisfy the first dimension constraintcondition and the height of the subblock fails to satisfy the seconddimension constraint condition in response to the height of the subblockbeing greater than 16 and the width of the subblock being greater than16.
 8. A coding method, comprising: acquiring residual data of a currentblock; determining size information of subblocks of the current blockbased on subblock partition information of the current block in responseto the current block satisfying a subblock partition condition andsubblock partition being activated; determining a transform paircorresponding to each subblock based on the size information of thesubblock; and performing a transform on residual data of the subblocksbased on the transform pairs corresponding to the subblocks: whereindetermining the transform pair corresponding to each subblock based onthe size information of the subblock comprises: determining DiscreteSine Transform-7 (DST7) as a horizontal transform kernel in thetransform pair corresponding to the subblock in response to a width ofthe subblock satisfying a first dimension constraint condition;determining Discrete Cosine Transform-2 (DCT2) as the horizontaltransform kernel in the transform pair corresponding to the subblock inresponse to the width of the subblock failing to satisfy the firstdimension constraint condition; determining DST7 as a vertical transformkernel in the transform pair corresponding to the subblock in responseto a height of the subblock satisfying a second dimension constraintcondition; and determining DCT2 as the vertical transform kernel in thetransform pair corresponding to the subblock in response to the heightof the subblock failing to satisfy the second dimension constraintcondition; wherein the first dimension constraint condition is that thewidth of the subblock is greater than or equal to 4 and less than orequal to 16; and the second dimension constraint condition is that theheight of the subblock is greater than or equal to 4 and less than orequal to
 16. 9. The coding method according to claim 8, the subblockpartition condition comprises at least: the current block is a lumablock, and the height and the width of the current block are both lessthan or equal to a first preset value.
 10. A decoder, comprising aprocessor and a memory storing at least one instruction executable bythe processor; wherein the processor, when loading and executing the atleast one instruction, is caused to perform a method comprising:acquiring coded data of a current block; determining size information ofsubblocks based on subblock partition information of the current blockin response to the current block satisfying a subblock partitioncondition and determining, based on the coded data of the current block,that the current block activates intra subblock partition; determining,based on the size information of each subblock, a transform paircorresponding to the subblock; and performing an inverse transform oninversely quantized data of the subblocks based on the transform pairscorresponding to the subblocks; wherein determining, based on the sizeinformation of the each subblock, the transform pair corresponding tothe subblock comprises: determining Discrete Sine Transform-7 (DST7) asa horizontal transform kernel in the transform pair corresponding to thesubblock in response to a width of the subblock satisfying a firstdimension constraint condition; determining Discrete Cosine Transform-2(DCT2) as the horizontal transform kernel in the transform paircorresponding to the subblock in response to the width of the subblockfailing to satisfy the first dimension constraint condition; determiningDST7 as a vertical transform kernel in the transform pair correspondingto the subblock in response to a height of the subblock satisfying asecond dimension constraint condition; and determining DCT2 as thevertical transform kernel in the transform pair corresponding to thesubblock in response to the height of the subblock failing to satisfythe second dimension constraint condition; wherein the first dimensionconstraint condition is that the width of the subblock is greater thanor equal to 4 and less than or equal to 16; and the second dimensionconstraint condition is that the height of the subblock is greater thanor equal to 4 and less than or equal to
 16. 11. A coder, comprising aprocessor and a memory storing at least one instruction executable bythe processor; wherein the processor, when loading and executing the atleast one instruction, is caused to perform a method comprising:acquiring residual data of a current block; determining size informationof subblocks of the current block based on subblock partitioninformation of the current block in response to the current blocksatisfying a subblock partition condition and subblock partition beingactivated; determining a transform pair corresponding to each subblockbased on the size information of the subblock; and performing atransform on residual data of the subblocks based on the transform pairscorresponding to the subblocks; wherein determining the transform paircorresponding to each subblock based on the size information of thesubblock comprises: determining Discrete Sine Transform-7 (DST7) as ahorizontal transform kernel in the transform pair corresponding to thesubblock in response to a width of the subblock satisfying a firstdimension constraint condition; determining Discrete Cosine Transform-2(DCT2) as the horizontal transform kernel in the transform paircorresponding to the subblock in response to the width of the subblockfailing to satisfy the first dimension constraint condition; determiningDST7 as a vertical transform kernel in the transform pair correspondingto the subblock in response to a height of the subblock satisfying asecond dimension constraint condition; and determining DCT2 as thevertical transform kernel in the transform pair corresponding to thesubblock in response to the height of the subblock failing to satisfythe second dimension constraint condition; wherein the first dimensionconstraint condition is that the width of the subblock is greater thanor equal to 4 and less than or equal to 16; and the second dimensionconstraint condition is that the height of the subblock is greater thanor equal to 4 and less than or equal to
 16. 12. A non-transitorycomputer-readable storage medium, storing at least one instructionexecutable by a processor; wherein the at least one instruction, whenloaded and executed by the processor, causes the processor to perform:acquiring coded data of a current block; determining size information ofsubblocks based on subblock partition information of the current blockin response to the current block satisfying a subblock partitioncondition and determining, based on the coded data of the current block,that the current block activates intra subblock partition; determining,based on the size information of each subblock, a transform paircorresponding to the subblock; and performing an inverse transform oninversely quantized data of the subblocks based on the transform pairscorresponding to the subblocks; wherein determining, based on the sizeinformation of the each subblock, the transform pair corresponding tothe subblock comprises: determining Discrete Sine Transform-7 (DST7) asa horizontal transform kernel in the transform pair corresponding to thesubblock in response to a width of the subblock satisfying a firstdimension constraint condition; determining Discrete Cosine Transform-2(DCT2) as the horizontal transform kernel in the transform paircorresponding to the subblock in response to the width of the subblockfailing to satisfy the first dimension constraint condition; determiningDST7 as a vertical transform kernel in the transform pair correspondingto the subblock in response to a height of the subblock satisfying asecond dimension constraint condition; and determining DCT2 as thevertical transform kernel in the transform pair corresponding to thesubblock in response to the height of the subblock failing to satisfythe second dimension constraint condition; wherein the first dimensionconstraint condition is that the width of the subblock is greater thanor equal to 4 and less than or equal to 16; and the second dimensionconstraint condition is that the height of the subblock is greater thanor equal to 4 and less than or equal to
 16. 13. The storage mediumaccording to claim 12, wherein the subblock partition conditioncomprises at least: the current block is a luma block, and the heightand the width of the current block are both less than or equal to afirst preset value.
 14. The storage medium according to claim 12,wherein determining, based on the size information of the each subblock,the transform pair corresponding to the subblock comprises: determiningDST7 as the horizontal transform kernel in the transform paircorresponding to the subblock and determining DST7 as the verticaltransform kernel in the transform pair corresponding to the subblock inresponse to the width of the subblock being equal to the height of thesubblock, the width of the subblock satisfying the first dimensionconstraint condition and the height of the subblock satisfying thesecond dimension constraint condition.
 15. The storage medium accordingto claim 12, wherein both the width and height of the subblock are equalto 4, or 8, or
 16. 16. The storage medium according to claim 12, whereinthe width of the subblock satisfies the first dimension constraintcondition and the height of the subblock fails to satisfy the seconddimension constraint condition in response to the width of the subblockbeing greater than or equal to 4 and less than or equal to 16 and theheight of the subblock being equal to 32 or
 64. 17. The storage mediumaccording to claim 12, wherein the width of the subblock fails tosatisfy the first dimension constraint condition and the height of thesubblock satisfies the second dimension constraint condition in responseto the height of the subblock being greater than or equal to 4 and lessthan or equal to 16 and the width of the subblock being equal to 32 or64.
 18. The storage medium according to claim 12, wherein the width ofthe subblock fails to satisfy the first dimension constraint conditionand the height of the subblock fails to satisfy the second dimensionconstraint condition in response to the width of the subblock beinggreater than 1 and less than 4 and the height of the subblock beinggreater than 16; or the width of the subblock fails to satisfy the firstdimension constraint condition and the height of the subblock fails tosatisfy the second dimension constraint condition in response to theheight of the subblock being greater than 1 and less than 4 and thewidth of the subblock being greater than 16; or the width of thesubblock fails to satisfy the first dimension constraint condition andthe height of the subblock fails to satisfy the second dimensionconstraint condition in response to the height of the subblock beinggreater than 16 and the width of the subblock being greater than
 16. 19.A non-transitory computer-readable storage medium, storing at least oneinstruction executable by a processor; wherein the at least oneinstruction, when loaded and executed by the processor, causes theprocessor to perform: acquiring residual data of a current block;determining size information of subblocks of the current block based onsubblock partition information of the current block in response to thecurrent block satisfying a subblock partition condition and subblockpartition being activated; determining a transform pair corresponding toeach subblock based on the size information of the subblock; andperforming a transform on residual data of the subblocks based on thetransform pairs corresponding to the subblocks; wherein determining thetransform pair corresponding to each subblock based on the sizeinformation of the subblock comprises: determining Discrete SineTransform-7 (DST7) as a horizontal transform kernel in the transformpair corresponding to the subblock in response to a width of thesubblock satisfying a first dimension constraint condition; determiningDiscrete Cosine Transform-2 (DCT2) as the horizontal transform kernel inthe transform pair corresponding to the subblock in response to thewidth of the subblock failing to satisfy the first dimension constraintcondition; determining DST7 as a vertical transform kernel in thetransform pair corresponding to the subblock in response to a height ofthe subblock satisfying a second dimension constraint condition; anddetermining DCT2 as the vertical transform kernel in the transform paircorresponding to the subblock in response to the height of the subblockfailing to satisfy the second dimension constraint condition; whereinthe first dimension constraint condition is that the width of thesubblock is greater than or equal to 4 and less than or equal to 16; andthe second dimension constraint condition is that the height of thesubblock is greater than or equal to 4 and less than or equal to
 16. 20.The storage medium according to claim 19, wherein the subblock partitioncondition comprises at least: the current block is a luma block, and theheight and the width of the current block are both less than or equal toa first preset value.